[MERGE] merged the branch with mrp test rehab (includes mrp workflow fixes)
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 25 Sep 2013 10:20:34 +0000 (12:20 +0200)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 25 Sep 2013 10:20:34 +0000 (12:20 +0200)
bzr revid: qdp-launchpad@openerp.com-20130925102034-fn2qdkx55ylai9rr

1  2 
addons/mrp/mrp.py

@@@ -824,14 -824,14 +824,6 @@@ class mrp_production(osv.osv)
                  if rest_qty > 0 :
                      stock_mov_obj.action_consume(cr, uid, [produce_product.id], (subproduct_factor * production_qty), context=context)
  
-         for raw_product in production.move_lines2:
-             new_parent_ids = []
-             parent_move_ids = [x.id for x in raw_product.move_history_ids]
-             for final_product in production.move_created_ids2:
-                 if final_product.id not in parent_move_ids:
-                     new_parent_ids.append(final_product.id)
-             for new_parent_id in new_parent_ids:
-                 stock_mov_obj.write(cr, uid, [raw_product.id], {'move_history_ids': [(4,new_parent_id)]})
 -#         for raw_product in production.move_lines2:
 -#             new_parent_ids = []
 -#             parent_move_ids = [x.id for x in raw_product.move_history_ids]
 -#             for final_product in production.move_created_ids2:
 -#                 if final_product.id not in parent_move_ids:
 -#                     new_parent_ids.append(final_product.id)
 -#             for new_parent_id in new_parent_ids:
 -#                 stock_mov_obj.write(cr, uid, [raw_product.id], {'move_history_ids': [(4,new_parent_id)]})
          self.message_post(cr, uid, production_id, body=_("%s produced") % self._description, context=context)
          self.signal_button_produce_done(cr, uid, [production_id])
          return True