[IMP] account_voucher: reference field label + restrict payment options to accountants
This commit is contained in:
committed by
Thibault Delavallée
parent
e5a2ddc22f
commit
f15d84094d
@@ -328,7 +328,7 @@ class account_voucher(osv.osv):
|
||||
\n* The \'Cancelled\' status is used when user cancel voucher.'),
|
||||
'amount': fields.float('Total', digits_compute=dp.get_precision('Account'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True),
|
||||
'reference': fields.char('Ref #', readonly=True, states={'draft':[('readonly',False)]},
|
||||
'reference': fields.char('Reference', readonly=True, states={'draft':[('readonly',False)]},
|
||||
help="Transaction reference number.", copy=False),
|
||||
'number': fields.char('Number', readonly=True, copy=False),
|
||||
'move_id':fields.many2one('account.move', 'Account Entry', copy=False),
|
||||
|
||||
@@ -211,8 +211,8 @@
|
||||
<group col="2">
|
||||
<separator string="Payment Options" colspan="2"/>
|
||||
<field name="writeoff_amount" widget='monetary' options='{"currency_field": "currency_id"}'/>
|
||||
<label for="payment_option" string="Difference of payment amount" class="oe_inline"/>
|
||||
<field name="payment_option" widget="radio" required="1" nolabel="1"/>
|
||||
<label for="payment_option" string="Difference of payment amount" class="oe_inline" groups="account.group_account_user"/>
|
||||
<field name="payment_option" widget="radio" required="1" nolabel="1" groups="account.group_account_user"/>
|
||||
<field name="writeoff_acc_id"
|
||||
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"
|
||||
domain="[('type','=','other')]"/>
|
||||
@@ -334,7 +334,7 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="writeoff_amount" widget="monetary" attrs="{'invisible':[('writeoff_amount','=',0)]}" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="payment_option" required="1" attrs="{'invisible':[('writeoff_amount','=',0)]}"/>
|
||||
<field name="payment_option" required="1" attrs="{'invisible':[('writeoff_amount','=',0)]}" groups="account.group_account_user"/>
|
||||
<field name="writeoff_acc_id"
|
||||
attrs="{'invisible':['|', ('payment_option','!=','with_writeoff'), ('writeoff_amount','=',0)], 'required':[('payment_option','=','with_writeoff'), ('writeoff_amount','!=',0)]}"
|
||||
domain="[('type','=','other')]"/>
|
||||
@@ -497,7 +497,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="writeoff_amount" widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="payment_option" required="1" widget="radio" attrs="{'invisible':[('writeoff_amount','=',0)]}"/>
|
||||
<field name="payment_option" required="1" widget="radio" attrs="{'invisible':[('writeoff_amount','=',0)]}" groups="account.group_account_user"/>
|
||||
<field name="writeoff_acc_id"
|
||||
attrs="{'invisible':['|', ('payment_option','!=','with_writeoff'), ('writeoff_amount','=',0)], 'required':[('payment_option','=','with_writeoff')]}"
|
||||
domain="[('type','=','other')]"/>
|
||||
|
||||
Reference in New Issue
Block a user