From e9ff413d4519fc000317d17e5d166204a7790637 Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Tue, 15 Sep 2015 13:44:09 +0200 Subject: [PATCH] [FIX] account: move AccountTaxGroup class above AccountTax class During the upgrade, the 'tax_group_id' field on 'account.tax' model cannot be created because it needs the 'account_tax_group' table which is not yet created. Moving this class above the AccountTax class solves this problem. --- addons/account/models/account.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/addons/account/models/account.py b/addons/account/models/account.py index 54832597a49..401106de6b1 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -466,6 +466,12 @@ class ResPartnerBank(models.Model): # Tax #---------------------------------------------------------- +class AccountTaxGroup(models.Model): + _name = 'account.tax.group' + _order = 'sequence asc' + + name = fields.Char(required=True, translate=True) + sequence = fields.Integer(default=10) class AccountTax(models.Model): _name = 'account.tax' @@ -707,9 +713,4 @@ class AccountOperationTemplate(models.Model): self.label = self.name -class AccountTaxGroup(models.Model): - _name = 'account.tax.group' - _order = 'sequence asc' - name = fields.Char(required=True, translate=True) - sequence = fields.Integer(default=10)