diff --git a/addons/account/account.py b/addons/account/account.py index 554b94f6d9f..a58fedba7be 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -3151,16 +3151,18 @@ class wizard_multi_charts_accounts(osv.osv_memory): company_name = self.pool.get('res.company').browse(cr, uid, company_id, context=context) for tax_code_template in obj_tax_code_template.browse(cr, uid, children_tax_code_template, context=context): vals = { - 'name': (tax_code_root_id == tax_code_template.id) and company_name or tax_code_template.name, + 'name': (tax_code_root_id == tax_code_template.id) and company_name.name or tax_code_template.name, 'code': tax_code_template.code, 'info': tax_code_template.info, 'parent_id': tax_code_template.parent_id and ((tax_code_template.parent_id.id in tax_code_template_ref) and tax_code_template_ref[tax_code_template.parent_id.id]) or False, 'company_id': company_id, 'sign': tax_code_template.sign, } - new_tax_code = obj_tax_code.create(cr, uid, vals) - #recording the new tax code to do the mapping - tax_code_template_ref[tax_code_template.id] = new_tax_code + rec_list = obj_tax_code.search(cr, uid, [('name', '=', vals['name']),('company_id', '=', vals['company_id'])], context=context) + if not rec_list: + new_tax_code = obj_tax_code.create(cr, uid, vals) + #recording the new tax code to do the mapping + tax_code_template_ref[tax_code_template.id] = new_tax_code # Generate taxes from templates. tax_template_to_tax = {} diff --git a/addons/l10n_multilang/__openerp__.py b/addons/l10n_multilang/__openerp__.py index 45a7d1c676d..bdb13afd7b4 100644 --- a/addons/l10n_multilang/__openerp__.py +++ b/addons/l10n_multilang/__openerp__.py @@ -36,10 +36,9 @@ "depends" : ['account_accountant'], 'update_xml': [ 'l10n_multilang.xml', - 'l10n_multilang_demo.xml' ], 'demo_xml': [ - + 'l10n_multilang_demo.xml' ], 'installable': True, 'active': False,