[FIX] account: set conditional require attribute
When registering a payment on an invoice, the pop-up kept asking you to enter a writeoff_account_id even when no reconciliation was asked. The field should of course not be required in that case.
This commit is contained in:
@@ -210,9 +210,9 @@
|
||||
<field name="payment_difference_handling" widget="radio" nolabel="1"/>
|
||||
<div attrs="{'invisible': [('payment_difference_handling','=','open')]}">
|
||||
<label for="writeoff_account_id" class="oe_edit_only" string="Post Difference In"/>
|
||||
<field name="writeoff_account_id" string="Post Difference In" required="1"/>
|
||||
<field name="writeoff_account_id" string="Post Difference In" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
|
||||
<label for="writeoff_label" class="oe_edit_only" string="Label"/>
|
||||
<field name="writeoff_label" required="1"/>
|
||||
<field name="writeoff_label" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user