[FIX] Account : Onchange of product should affect price on supplier invoice line
lp bug: https://launchpad.net/bugs/510692 fixed bzr revid: jvo@tinyerp.com-20100122120930-ppgd22tfug34nav3
This commit is contained in:
parent
7681deb834
commit
f14e638fa6
|
@ -1064,7 +1064,7 @@ class account_invoice_line(osv.osv):
|
|||
taxes = res.supplier_taxes_id and res.supplier_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)
|
||||
to_update = self.product_id_change_unit_price_inv(cr, uid, tax_id, price_unit or res.standard_price, qty, address_invoice_id, product, partner_id, context=context)
|
||||
result.update(to_update)
|
||||
else:
|
||||
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
|
||||
|
|
Loading…
Reference in New Issue