Submit form only if scan_code is submit

Close #12764
(grafted from 92031f401afa24e63c0f85f3621ea8acaf9a0bac)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier committed 2023-11-20 20:41:34 +01:00
1 parent 4b9d992c79
commit 7c2bc0c08b
1 file changed
+3 -1
+3 -1
View File
@@ -425,7 +425,9 @@ function eval_pyson(value){
if (record) {
return record.on_scan_code(
code, this.attributes.scan_code_depends || []).done(() => {
this.el.parents('form').submit();
if (this.attributes.scan_code == 'submit') {
this.el.parents('form').submit();
}
});
} else {
return jQuery.when();