openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #02684
lp:~acsone-openerp/account-financial-tools/account_chart_update_tac_code_code2 into lp:account-financial-tools
Stéphane Bidoul (Acsone) has proposed merging lp:~acsone-openerp/account-financial-tools/account_chart_update_tac_code_code2 into lp:account-financial-tools.
Requested reviews:
Account Core Editors (account-core-editors)
For more details, see:
https://code.launchpad.net/~acsone-openerp/account-financial-tools/account_chart_update_tac_code_code2/+merge/200657
Hi,
Here is a small improvement to account_chart_update.
When a tax_code cannot be matched by name, attempt to match by code if one exists.
Thanks for this excellent tool.
Best regards,
-sbi
--
https://code.launchpad.net/~acsone-openerp/account-financial-tools/account_chart_update_tac_code_code2/+merge/200657
Your team Account Core Editors is requested to review the proposed merge of lp:~acsone-openerp/account-financial-tools/account_chart_update_tac_code_code2 into lp:account-financial-tools.
=== modified file 'account_chart_update/__openerp__.py'
--- account_chart_update/__openerp__.py 2013-10-15 14:28:59 +0000
+++ account_chart_update/__openerp__.py 2014-01-07 11:54:33 +0000
@@ -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 @@
"account",
"base",
],
- "demo" : [],
+ "demo": [],
"data": [
'wizard/wizard_chart_update_view.xml',
],
=== modified file 'account_chart_update/wizard/wizard_chart_update.py'
--- account_chart_update/wizard/wizard_chart_update.py 2013-11-27 14:36:05 +0000
+++ account_chart_update/wizard/wizard_chart_update.py 2014-01-07 11:54:33 +0000
@@ -267,6 +267,15 @@
('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]
Follow ups