[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#60122 X-original-commit: cf8545e10062ba89ac0de5441cfcbdb65d921eaa Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
<field name="model">sale.advance.payment.inv</field>
|
||||
<field name="inherit_id" ref="sale.view_sale_advance_payment_inv"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form" position="attributes">
|
||||
<attribute name="disable_autofocus">true</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='deposit_taxes_id']" position="after">
|
||||
<field name="invoicing_timesheet_enabled" invisible="1"/>
|
||||
<label for="date_start_invoice_timesheet" string="Timesheets Period" attrs="{'invisible': [ '|', ('invoicing_timesheet_enabled', '=', False), ('advance_payment_method', '!=', 'delivered')]}"/>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user