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 #45253

X-original-commit: b093952
Signed-off-by: wan <william-andre@users.noreply.github.com>
  • Loading branch information
william-andre committed Feb 13, 2020
1 parent 77e05aa commit 741a7c7
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 @@ -182,9 +182,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 741a7c7

Please sign in to comment.