From f14e638fa6cb7fc8fdb65419b757b4d1f1ef69d4 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Fri, 22 Jan 2010 17:39:30 +0530 Subject: [PATCH] [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 --- addons/account/invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 0ddd831fa13..cd8ba660ba7 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -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})