[FIX] account: fix validation error on res.partner.bank's form toggle
Steps to reproduce: - Go to Accounting > Vendors > Vendors > Accounting tab > Add a new bank account - Enter a bank Account Number - Toggle Send Money - A validation error is thrown This is because the widget `boolean_toggle` triggers a save at each change of value by default, so it needs to be desactivated. opw-3306639 closes odoo/odoo#126333 X-original-commit: 1717a3ee9d2455eaa61010765be08707a491c93f Signed-off-by: William André (wan) <wan@odoo.com> Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<field name="lock_trust_fields" invisible="1"/>
|
||||
<label for="allow_out_payment"/>
|
||||
<div class="d-flex gap-2">
|
||||
<field name="allow_out_payment" widget="boolean_toggle" attrs="{'readonly': [('user_has_group_validate_bank_account', '=', False)]}"/>
|
||||
<field name="allow_out_payment" widget="boolean_toggle" options="{'autosave': False}" attrs="{'readonly': [('user_has_group_validate_bank_account', '=', False)]}"/>
|
||||
<span class="d-flex gap-2 w-100">
|
||||
<span attrs="{'invisible': [('allow_out_payment', '=', True)]}" class="text-muted">Untrusted</span>
|
||||
<span attrs="{'invisible': [('allow_out_payment', '=', False)]}" class="text-success">Trusted</span>
|
||||
|
||||
Reference in New Issue
Block a user