Skip to content

Commit

Permalink
[FIX] account: writeoff_account_id not required if no difference
Browse files Browse the repository at this point in the history
opw-2152644
Do not set the field writeoff_account_id as required if the
payment_difference is zero because there is no writeoff in that case and
the field is invisible.

closes #45155

X-original-commit: 0eafca6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
  • Loading branch information
william-andre committed Feb 12, 2020
1 parent b4e591b commit b093952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/account/views/account_payment_view.xml
Expand Up @@ -176,9 +176,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" options="{'no_create': True}" string="Post Difference In" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
<field name="writeoff_account_id" options="{'no_create': True}" string="Post Difference In" attrs="{'required': [('payment_difference_handling', '=', 'reconcile'), ('payment_difference', '!=', 0.0)]}"/>
<label for="writeoff_label" class="oe_edit_only" string="Label"/>
<field name="writeoff_label" attrs="{'required': [('payment_difference_handling', '=', 'reconcile')]}"/>
<field name="writeoff_label" attrs="{'required': [('payment_difference_handling', '=', 'reconcile'), ('payment_difference', '!=', 0.0)]}"/>
</div>
</div>
</group>
Expand Down

0 comments on commit b093952

Please sign in to comment.