[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:
+1
-1
@@ -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 = []
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user