[FIX]purchase:invoice_line have wrong unit price when PO made =>from picking

lp bug: https://launchpad.net/bugs/779064 fixed

bzr revid: ron@tinyerp.com-20110517084337-f39957zqveqpa2u4
This commit is contained in:
ron@tinyerp.com 2011-05-17 14:13:37 +05:30
parent 8bed1f4c7b
commit ff90f21812
1 changed files with 4 additions and 1 deletions

View File

@ -91,7 +91,10 @@ class stock_picking(osv.osv):
def _get_price_unit_invoice(self, cursor, user, move_line, type):
if move_line.purchase_line_id:
return move_line.purchase_line_id.price_unit
if move_line.purchase_line_id.order_id.invoice_method == 'picking':
return move_line.price_unit
else:
return move_line.purchase_line_id.price_unit
return super(stock_picking, self)._get_price_unit_invoice(cursor, user, move_line, type)
def _get_discount_invoice(self, cursor, user, move_line):