summaryrefslogtreecommitdiff
path: root/addons/web
diff options
context:
space:
mode:
authorKamesh Patel <kat@odoo.com>2020-09-25 06:21:34 +0000
committerKamesh Patel <kat@odoo.com>2020-09-28 11:16:15 +0000
commitcf8545e10062ba89ac0de5441cfcbdb65d921eaa (patch)
tree147008b656c9c9fed6fb294cf3c8a42d256a5663 /addons/web
parentf2a5476c52c1312d3dfc558f92b4a678d6aa5e25 (diff)
[FIX] sale_timesheet, web: disable autofocus on create invoce action
Before this commit: The date range widget opened by default when the 'create invoices' the wizard is opened. because the default focus is 'Timesheets Period' field. After this commit: Disable autofocus on 'create invoice' action, after this changes The date range widget is not opened by default when the 'create invoices' the wizard is opened. Task-2344289 closes odoo/odoo#58676 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/web')
-rw-r--r--addons/web/static/src/js/views/form/form_view.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form/form_view.js b/addons/web/static/src/js/views/form/form_view.js
index e3ec5177df3..a7885e0c393 100644
--- a/addons/web/static/src/js/views/form/form_view.js
+++ b/addons/web/static/src/js/views/form/form_view.js
@@ -38,7 +38,7 @@ var FormView = BasicView.extend({
hasActionMenus = params.hasActionMenus;
}
this.controllerParams.hasActionMenus = hasActionMenus;
- this.controllerParams.disableAutofocus = params.disable_autofocus;
+ this.controllerParams.disableAutofocus = params.disable_autofocus || this.arch.attrs.disable_autofocus;
this.controllerParams.toolbarActions = viewInfo.toolbar;
this.controllerParams.footerToButtons = params.footerToButtons;