← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 809523] Re: error: "You try to assign a lot which is not from the same product" on produce manufacturing orders

 

*** This bug is a duplicate of bug 767208 ***
    https://bugs.launchpad.net/bugs/767208

** This bug has been marked a duplicate of bug 767208
   MO: consume products overwrites production lot in finished goods

** Branch linked: lp:~openerp-dev/openobject-addons/6.0-bug-767208-vro

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/809523

Title:
  error: "You try to assign a lot which is not from the same product" on
  produce manufacturing orders

Status in OpenERP Modules (addons):
  Fix Committed

Bug description:
  create a simple bom (a product with only a component), now create a
  new manufacturing order. select the bom, press the "confirm
  production" button. now double click on the consumed product and set
  the used production lot, double click on the finished product and set
  the production lot i want to assign. click on the force reservation
  button, click on start production button, click on produce button. in
  the dialog click on the confirm button. here i get the error.

  the problem is that the stock move generated by the consumed product
  has the move_dest_id field valorized with the id of the stock move
  generated by the finished product. one of the functions called is
  action_done of the class stock_move in the file stock/stock.py and at
  the row 2137

  2136                    if move.prodlot_id.id:
  2137                        self.write(cr, uid, [move.move_dest_id.id], {'prodlot_id':move.prodlot_id.id})

  assign to the stock move definied by the move.move_dest_id the
  prodlot_id of the stock move but in the case of manufacturing order
  these two stock move refer to different products and so the error.

  i try to resolve in this way:

  stock/stock.py

  2136c2136
  <                     if move.prodlot_id.id:
  ---
  >                     if move.prodlot_id.id and move.product_id==move.move_dest_id.product_id:

  this change is correct?

  openerp v6.02
  ubuntu lucid 64

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/809523/+subscriptions


References