[FIX] account: small fix in generation of tax code from tax code objects

bzr revid: qdp-launchpad@openerp.com-20111209000506-8iyd5551lmcmt995
This commit is contained in:
Quentin (OpenERP) 2011-12-09 01:05:06 +01:00
parent c52bb36f7f
commit aefa500ca9
1 changed files with 1 additions and 1 deletions

View File

@ -2621,7 +2621,7 @@ class account_tax_code_template(osv.osv):
'sign': tax_code_template.sign,
}
#check if this tax code already exists
rec_list = obj_tax_code.search(cr, uid, [('name', '=', vals['name']),('company_id', '=', vals['company_id'])], context=context)
rec_list = obj_tax_code.search(cr, uid, [('name', '=', vals['name']),('code', '=', vals['code']),('company_id', '=', vals['company_id'])], context=context)
if not rec_list:
#if not yet, create it
new_tax_code = obj_tax_code.create(cr, uid, vals)