From a588cda474052ca770f12bc85da6a4977fc091d3 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Tue, 18 Jun 2013 10:13:39 +0200 Subject: [PATCH] [CHG] move the _columns before the orm public methods --- .../account_move_line.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/account_compute_tax_amount/account_move_line.py b/account_compute_tax_amount/account_move_line.py index f6ea50150..3d4ecbcfe 100644 --- a/account_compute_tax_amount/account_move_line.py +++ b/account_compute_tax_amount/account_move_line.py @@ -29,6 +29,18 @@ import openerp.addons.decimal_precision as dp class account_move_line(orm.TransientModel): _inherit = "account.move.line" + # We set the tax_amount invisible, because we recompute it in every case. + _columns = { + 'tax_amount': fields.float('Tax/Base Amount', + digits_compute=dp.get_precision('Account'), + invisible=True, + select=True, + help="If the Tax account is a tax code account, " + "this field will contain the taxed amount. " + "If the tax account is base tax code, " + "this field will contain the basic amount (without tax)."), + } + def create(self, cr, uid, vals, context=None, check=True): result = super(account_move_line, self).create(cr, uid, vals, context=context, @@ -63,15 +75,3 @@ class account_move_line(orm.TransientModel): context=context) return result - - # We set the tax_amount invisible, because we recompute it in every case. - _columns = { - 'tax_amount': fields.float('Tax/Base Amount', - digits_compute=dp.get_precision('Account'), - invisible=True, - select=True, - help="If the Tax account is a tax code account, " - "this field will contain the taxed amount. " - "If the tax account is base tax code, " - "this field will contain the basic amount (without tax)."), - }