From 6886211430d1dc8a3ffea3a01d5cca919e56ff4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Tue, 7 Jan 2014 12:48:24 +0100 Subject: [PATCH 1/4] [IMP] attempt to match tax code on code if no match on name was found --- account_chart_update/wizard/wizard_chart_update.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/account_chart_update/wizard/wizard_chart_update.py b/account_chart_update/wizard/wizard_chart_update.py index 6222e106f..357e8be81 100644 --- a/account_chart_update/wizard/wizard_chart_update.py +++ b/account_chart_update/wizard/wizard_chart_update.py @@ -267,6 +267,15 @@ class wizard_update_charts_accounts(orm.TransientModel): ('name', '=', tax_code_name), ('company_id', '=', wizard.company_id.id) ]) + if not tax_code_ids: + # if we could not match no tax code template name, + # try to match on tax code template code, if any + tax_code_code = tax_code_template.code + if tax_code_code: + tax_code_ids = tax_codes.search(cr, uid, [ + ('code', '=', tax_code_code), + ('company_id', '=', wizard.company_id.id) + ]) if tax_code_ids: tax_code_template_mapping[ tax_code_template.id] = tax_code_ids[0] From bf76cf5f695ff1d9200364b2082c4f4d32268288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Tue, 7 Jan 2014 12:54:23 +0100 Subject: [PATCH 2/4] bump version --- account_chart_update/__openerp__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_chart_update/__openerp__.py b/account_chart_update/__openerp__.py index a972f0e9c..9c5b6ab01 100644 --- a/account_chart_update/__openerp__.py +++ b/account_chart_update/__openerp__.py @@ -26,7 +26,7 @@ { 'name': "Detect changes and update the Account Chart from a template", - 'version': "1.0", + 'version': "1.0.1", 'author': "Zikzakmedia SL", 'website': "www.zikzakmedia.com", 'depends': ["account"], @@ -62,7 +62,7 @@ Any problem found while updating will be shown on the last step. "account", "base", ], - "demo" : [], + "demo": [], "data": [ 'wizard/wizard_chart_update_view.xml', ], From 941f0f973cce192fd59cb7adf1f80cd17b74ef3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Tue, 7 Jan 2014 13:02:41 +0100 Subject: [PATCH 3/4] updated the contributors section --- account_chart_update/__openerp__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/account_chart_update/__openerp__.py b/account_chart_update/__openerp__.py index 9c5b6ab01..18df38b94 100644 --- a/account_chart_update/__openerp__.py +++ b/account_chart_update/__openerp__.py @@ -31,7 +31,12 @@ 'website': "www.zikzakmedia.com", 'depends': ["account"], 'category': "Generic Modules/Accounting", - 'contributors': ['Joaquín Gutierrez', 'Pedro M. Baeza', 'invitu'], + 'contributors': [ + 'Joaquín Gutierrez', + 'Pedro M. Baeza', + 'invitu', + 'Stéphane Bidoul', + ], 'description': """ Adds a wizard to update a company account chart from a chart template. ====================================================================== From b887c07d6c5f3902beef304cd737b3249ac4ff31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Tue, 7 Jan 2014 15:06:56 +0100 Subject: [PATCH 4/4] 2 digits scheme for version number --- account_chart_update/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_chart_update/__openerp__.py b/account_chart_update/__openerp__.py index 18df38b94..bbfb2b93a 100644 --- a/account_chart_update/__openerp__.py +++ b/account_chart_update/__openerp__.py @@ -26,7 +26,7 @@ { 'name': "Detect changes and update the Account Chart from a template", - 'version': "1.0.1", + 'version': "1.1", 'author': "Zikzakmedia SL", 'website': "www.zikzakmedia.com", 'depends': ["account"],