[IMP] account: Improved var name

bzr revid: pso@tinyerp.com-20101210112305-yom9q4c86xa3815r
This commit is contained in:
pso 2010-12-10 16:53:05 +05:30
parent 0b0115058b
commit bf2bebd154
1 changed files with 10 additions and 10 deletions

View File

@ -1402,17 +1402,17 @@ class account_invoice_line(osv.osv):
tax_ids = self.pool.get('account.tax').search(cr, uid, [('company_id', '=', company_id)])
if type in ('out_invoice', 'out_refund'):
def_sale_taxes = map(lambda x: x.id, res.taxes_id)
sale_tax_list = [tax for tax in tax_ids if tax in def_sale_taxes]
sale_tax_id = self.pool.get('account.tax').browse(cr, uid, sale_tax_list)
sale_taxes = sale_tax_id and sale_tax_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False)
tax_id = fpos_obj.map_tax(cr, uid, fpos, sale_taxes)
sale_taxes_def = map(lambda x: x.id, res.taxes_id)
sale_tax_ids = [tax for tax in tax_ids if tax in sale_taxes_def]
sale_taxes = self.pool.get('account.tax').browse(cr, uid, sale_tax_ids)
sale_taxes_all = sale_taxes and sale_taxes or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False)
tax_id = fpos_obj.map_tax(cr, uid, fpos, sale_taxes_all)
else:
def_pur_taxes = map(lambda x: x.id, res.supplier_taxes_id)
pur_tax_list = [tax for tax in tax_ids if tax in def_pur_taxes]
pur_tax_id = self.pool.get('account.tax').browse(cr, uid, pur_tax_list)
pur_taxes = pur_tax_id and pur_tax_id or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False)
tax_id = fpos_obj.map_tax(cr, uid, fpos, pur_taxes)
pur_taxes_def = map(lambda x: x.id, res.supplier_taxes_id)
pur_tax_ids = [tax for tax in tax_ids if tax in pur_taxes_def]
pur_taxes = self.pool.get('account.tax').browse(cr, uid, pur_tax_ids)
pur_taxes_all = pur_taxes and pur_taxes or (a and self.pool.get('account.account').browse(cr, uid, a).tax_ids or False)
tax_id = fpos_obj.map_tax(cr, uid, fpos, pur_taxes_all)
if type in ('in_invoice', 'in_refund'):
result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )