From 6ab74d0d8db3bc72940d25c95db84d05fc5e55fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Najla=C3=A2?= Date: Wed, 12 Mar 2014 14:05:22 +0100 Subject: [PATCH] [FIX] account: change decimal precision to avoid erasing tax and base values when updating a tax with coefficients on more than 2 decimals bzr revid: nel@tinyerp.com-20140312130522-qr5e010onc7ejrz5 --- addons/account/account.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index c45c337f019..2910d3d64a1 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1949,15 +1949,15 @@ class account_tax(osv.osv): # 'base_code_id': fields.many2one('account.tax.code', 'Account Base Code', help="Use this code for the tax declaration."), 'tax_code_id': fields.many2one('account.tax.code', 'Account Tax Code', help="Use this code for the tax declaration."), - 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), - 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), + 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), + 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), # Same fields for refund invoices 'ref_base_code_id': fields.many2one('account.tax.code', 'Refund Base Code', help="Use this code for the tax declaration."), 'ref_tax_code_id': fields.many2one('account.tax.code', 'Refund Tax Code', help="Use this code for the tax declaration."), - 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."), - 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."), + 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), + 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1.", digits_compute=get_precision_tax()), 'include_base_amount': fields.boolean('Included in base amount', help="Indicates if the amount of tax must be included in the base amount for the computation of the next taxes"), 'company_id': fields.many2one('res.company', 'Company', required=True), 'description': fields.char('Tax Code'),