[IMP] account_voucher: make the field tax_amount always readonly
The field tax_amount is fieled with onchanges and the compute_tax method. Setting a different value than the one computed by the system may lead to unbalanced move (which is obviously wrong). In the future, handeling these operations by setting the correct value to the tax accounts would be better.
This commit is contained in:
parent
85b08a75f6
commit
f572b27ec8
|
@ -367,7 +367,7 @@ class account_voucher(osv.osv):
|
|||
\n* The \'Posted\' status is used when user create voucher,a voucher number is generated and voucher entries are created in account \
|
||||
\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, states={'draft':[('readonly',False)]}),
|
||||
'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True),
|
||||
'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
|
||||
'number': fields.char('Number', size=32, readonly=True,),
|
||||
'move_id':fields.many2one('account.move', 'Account Entry'),
|
||||
|
|
Loading…
Reference in New Issue