[IMP]: account: l10n fullness and inheritancy : Removed duplicate tax_code genearted from tax_code_template and improved code(name field)
bzr revid: ron@tinyerp.com-20110905132836-7dletz0qr3ti5n72
This commit is contained in:
parent
88bc353ca7
commit
abbc74de99
|
@ -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 = {}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue