STOCK: add product_id in the context for product_expiry to calculate dates

bzr revid: ced-6e234782deb1810d799f4cd6f94889743508aa84
This commit is contained in:
ced
2007-06-04 10:46:59 +00:00
parent b7324422b2
commit 6d9e3cbeaa
+1 -1
View File
@@ -86,7 +86,7 @@ def _track_lines(self, cr, uid, data, context):
new_move.append(current_move)
else:
current_move = move.id
new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx})
new_prodlot = prodlot_obj.create(cr, uid, {'name': sequence, 'ref': '%d'%idx}, {'product_id': move.product_id.id})
update_val['prodlot_id'] = new_prodlot
move_obj.write(cr, uid, [current_move], update_val)
production_ids = production_obj.search(cr, uid, [('move_lines', 'in', [move.id])])