[FIX] mrp: regression: production orders moves are wrongly done from 'Stock' to 'Stock'

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

bzr revid: hmo@tinyerp.com-20101020105816-08af1r7unnxcagv0
This commit is contained in:
Harry (OpenERP)
2010-10-20 16:28:16 +05:30
parent e1d066b768
commit 29b353d5d2
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -745,7 +745,7 @@ class mrp_production(osv.osv):
if rest_qty <= production_qty:
production_qty = rest_qty
if rest_qty > 0 :
stock_mov_obj.action_consume(cr, uid, [produce_product.id], production_qty, production.location_dest_id.id, context=context)
stock_mov_obj.action_consume(cr, uid, [produce_product.id], production_qty, context=context)
for raw_product in production.move_lines2:
new_parent_ids = []
+2 -3
View File
@@ -2215,7 +2215,7 @@ class stock_move(osv.osv):
'product_qty': quantity,
'product_uos_qty': uos_qty,
'state': move.state,
'location_id': location_id
'location_id': location_id or move.location_id.id,
}
if move.product_id.track_production and location_id:
# IF product has checked track for production lot, move lines will be split by 1
@@ -2238,9 +2238,8 @@ class stock_move(osv.osv):
update_val = {
'product_qty' : quantity_rest,
'product_uos_qty' : uos_qty_rest,
'location_id': location_id
'location_id': location_id or move.location_id.id
}
self.write(cr, uid, [move.id], update_val)
product_obj = self.pool.get('product.product')