From cf8545e10062ba89ac0de5441cfcbdb65d921eaa Mon Sep 17 00:00:00 2001 From: Kamesh Patel Date: Fri, 25 Sep 2020 06:21:34 +0000 Subject: [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) --- addons/web/static/src/js/views/form/form_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js') 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; -- cgit v1.2.3