2
0

[MIG] account_chart_update: Migration to 10.0

This commit is contained in:
Sylvain Van Hoof 2017-03-14 11:54:08 +01:00 committed by Luis J. Salvatierra
parent fa34bca71b
commit 7093779041
3 changed files with 9 additions and 5 deletions

View File

@ -57,6 +57,7 @@ Contributors
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Jairo Llopis <jairo.llopis@tecnativa.com>
* Jacques-Etienne Baudoux <je@bcim.be>
* Sylvain Van Hoof <sylvain@okia.be>
Maintainer
----------

View File

@ -2,14 +2,16 @@
# Copyright 2015-2017 Pedro Manuel Baeza <pedro.baeza@tecnativa.com>
# Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# Copyright 2016 Jacques-Etienne Baudoux <je@bcim.be>
# Copyright 2016 Sylvain Van Hoof <sylvain@okia.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': "Detect changes and update the Account Chart from a template",
"summary": "Wizard to update a company's account chart from a template",
'version': "9.0.1.0.0",
'version': "10.0.1.0.0",
'author': "Tecnativa, "
"BCIM,"
"BCIM, "
"Okia, "
"Odoo Community Association (OCA)",
'website': "http://odoo-community.org",
'depends': ["account"],
@ -18,6 +20,7 @@
'Pedro M. Baeza',
'Jairo Llopis',
'Jacques-Etienne Baudoux',
'Sylvain Van Hoof'
],
'license': "AGPL-3",
"data": [

View File

@ -400,10 +400,9 @@ class WizardUpdateChartsAccounts(models.TransientModel):
def diff_fields(self, template, real):
"""Get fields that are different in template and real records.
:param openerp.models.Model template:
:param odoo.models.Model template:
Template record.
:param openerp.models.Model real:
:param odoo.models.Model real:
Real record.
:return dict:
@ -561,6 +560,7 @@ class WizardUpdateChartsAccounts(models.TransientModel):
"""Load fiscal position templates to create/update."""
wiz_fp = self.env['wizard.update.charts.accounts.fiscal.position']
self.fiscal_position_ids.unlink()
# Search for new / updated fiscal positions
templates = self.env['account.fiscal.position.template'].search(
[('chart_template_id', 'in', self.chart_template_ids.ids)])