Comment 7 for bug 535401

Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

Hello Don,
thanks for the comment,
I have checked your fix but it doesn't fix the problem, (may be because its very old fix),
The old code was writing state of move directly like:
=== modified file 'mrp/mrp.py'
--- mrp/mrp.py 2010-12-13 04:45:34 +0000
+++ mrp/mrp.py 2010-12-15 11:16:00 +0000
@@ -705,10 +704,7 @@
                             stock_mov_obj.action_consume(cr, uid, [raw_product.id], consumed_qty, production.location_src_id.id, context=context)

         if production_mode == 'consume_produce':
- # To produce remaining qty of final product
- vals = {'state':'confirmed'}
- final_product_todo = [x.id for x in production.move_created_ids]
- stock_mov_obj.write(cr, uid, final_product_todo, vals)
+
             produced_products = {}
             for produced_product in production.move_created_ids2:
                 if produced_product.scrapped:

and the chained picking is created only when action_confirm() is called,
So the goal of the fix was to call proper function of stock.move for state changes,
Hope this helps,
Thanks