[FIX] bugfixes
bzr revid: qdp@tinyerp.com-20090126153956-upukltqmz02jbopb
This commit is contained in:
parent
1b11122274
commit
2ef4891695
|
@ -987,11 +987,11 @@ class account_invoice_line(osv.osv):
|
|||
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid,a).tax_ids or False)
|
||||
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
|
||||
else:
|
||||
taxes = res.supplier_taxes_id and res.supplier_taxes_id or a.tax_ids
|
||||
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid,a).tax_ids or False)
|
||||
tax_id = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
|
||||
if type in ('in_invoice', 'in_refund'):
|
||||
to_update = self.product_id_change_unit_price_inv(cr, uid, tax_id, price_unit, qty, address_invoice_id, product, partner_id, context=context)
|
||||
result.update(to_update['value'])
|
||||
result.update(to_update)
|
||||
else:
|
||||
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ class account_fiscal_position(osv.osv):
|
|||
}
|
||||
|
||||
def map_tax(self, cr, uid, fposition_id, taxes, context={}):
|
||||
if not taxes:
|
||||
return []
|
||||
if not fposition_id:
|
||||
return map(lambda x: x.id, taxes)
|
||||
result = []
|
||||
|
|
Loading…
Reference in New Issue