Skip to content

Commit

Permalink
[FIX] mrp: display lot_id in production wizard if full tracking
Browse files Browse the repository at this point in the history
Show lot_id on production wizard
if product is fully tracked
(but not marked specifically for production tracking

Closes odoo#4223
  • Loading branch information
Stefan Rijnhart authored and beledouxdenis committed Sep 28, 2015
1 parent 420e198 commit 5f79cbd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions addons/mrp/wizard/mrp_product_produce.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ def _get_product_id(self, cr, uid, context=None):
return prod and prod.product_id.id or False

def _get_track(self, cr, uid, context=None):
prod = self._get_product_id(cr, uid, context=context)
prod_obj = self.pool.get("product.product")
return prod and prod_obj.browse(cr, uid, prod, context=context).track_production or False
product_id = self._get_product_id(cr, uid, context=context)
if not product_id:
return False
product = self.pool.get("product.product").browse(
cr, uid, product_id, context=context)
return product.track_all or product.track_production or False

_defaults = {
'product_qty': _get_product_qty,
Expand Down

0 comments on commit 5f79cbd

Please sign in to comment.