[FIX] account_voucher: better pay invoice wizard

If the writeoff_amount is above 0, the fields writeoff_acc_id can be displayed and is required depending of the payment option. If the writeoff_amount is reset to 0, this field should no longer be required.
This commit is contained in:
Martin Trigaux 2014-06-10 12:26:46 +02:00
parent 6fdb783a37
commit fdd00fe635
1 changed files with 1 additions and 1 deletions

View File

@ -334,7 +334,7 @@
<field name="writeoff_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<field name="payment_option" required="1" attrs="{'invisible':[('writeoff_amount','=',0)]}"/>
<field name="writeoff_acc_id"
attrs="{'invisible':['|', ('payment_option','!=','with_writeoff'), ('writeoff_amount','=',0)], 'required':[('payment_option','=','with_writeoff')]}"
attrs="{'invisible':['|', ('payment_option','!=','with_writeoff'), ('writeoff_amount','=',0)], 'required':[('payment_option','=','with_writeoff'), ('writeoff_amount','!=',0)]}"
domain="[('type','=','other')]"/>
<field name="comment"
attrs="{'invisible':['|', ('payment_option','!=','with_writeoff'), ('writeoff_amount','=',0)]}"/>