From f572b27ec8cbf02ae633485d07458d838f1ad0aa Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 18 Aug 2014 17:59:17 +0200 Subject: [PATCH] [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. --- addons/account_voucher/account_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py index 3b0bfe80ba4..4b19ae6b824 100644 --- a/addons/account_voucher/account_voucher.py +++ b/addons/account_voucher/account_voucher.py @@ -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'),