projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e0c73d
)
[FIX] purchase: keep reference to purchase order line
author
Martin Trigaux
<mat@openerp.com>
Wed, 17 Sep 2014 14:32:43 +0000
(16:32 +0200)
committer
Martin Trigaux
<mat@openerp.com>
Wed, 17 Sep 2014 14:32:43 +0000
(16:32 +0200)
When generating an invoice from a stock.picking, the reference to the purchase.order.line needs to be kept (e.g. this is needed by anglo-saxon for price valuation). (opw 600767)
addons/purchase/stock.py
patch
|
blob
|
history
diff --git
a/addons/purchase/stock.py
b/addons/purchase/stock.py
index
320e35c
..
205513c
100644
(file)
--- a/
addons/purchase/stock.py
+++ b/
addons/purchase/stock.py
@@
-54,6
+54,8
@@
class stock_move(osv.osv):
return super(stock_move, self).copy(cr, uid, id, default, context)
def _create_invoice_line_from_vals(self, cr, uid, move, invoice_line_vals, context=None):
+ if move.purchase_line_id:
+ invoice_line_vals['purchase_line_id'] = move.purchase_line_id.id
invoice_line_id = super(stock_move, self)._create_invoice_line_from_vals(cr, uid, move, invoice_line_vals, context=context)
if move.purchase_line_id:
purchase_line = move.purchase_line_id