diff --git a/addons/account/account.py b/addons/account/account.py index 3df1dc622d1..8f1329cc30e 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2002,12 +2002,12 @@ class wizard_multi_charts_accounts(osv.osv_memory): 'python_compute_inv': tax.python_compute_inv, 'python_applicable': tax.python_applicable, 'tax_group':tax.tax_group, - 'base_code_id': tax.base_code_id and tax_code_template_ref[tax.base_code_id.id] or False, - 'tax_code_id': tax.tax_code_id and tax_code_template_ref[tax.tax_code_id.id] or False, + 'base_code_id': tax.base_code_id and ((tax.base_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.base_code_id.id]) or False, + 'tax_code_id': tax.tax_code_id and ((tax.tax_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.tax_code_id.id]) or False, 'base_sign': tax.base_sign, 'tax_sign': tax.tax_sign, - 'ref_base_code_id': tax.ref_base_code_id and tax_code_template_ref[tax.ref_base_code_id.id] or False, - 'ref_tax_code_id': tax.ref_tax_code_id and tax_code_template_ref[tax.ref_tax_code_id.id] or False, + 'ref_base_code_id': tax.ref_base_code_id and ((tax.ref_base_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.ref_base_code_id.id]) or False, + 'ref_tax_code_id': tax.ref_tax_code_id and ((tax.ref_tax_code_id.id in tax_code_template_ref) and tax_code_template_ref[tax.ref_tax_code_id.id]) or False, 'ref_base_sign': tax.ref_base_sign, 'ref_tax_sign': tax.ref_tax_sign, 'include_base_amount': tax.include_base_amount,