[FIX] product_expiry: date on lot
- Create a product tracked by lot with some date values != 0 - Create a MO for this product, click on 'Produce' - Create a new lot. The various dates are not registered on the lot. The product ID is located in the context in this case, not in the values. opw-803790
This commit is contained in:
committed by
Nicolas Martinelli
parent
d20c74dd65
commit
6139840796
@@ -44,7 +44,7 @@ class StockProductionLot(models.Model):
|
||||
# Assign dates according to products data
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
dates = self._get_dates(vals.get('product_id'))
|
||||
dates = self._get_dates(vals.get('product_id') or self.env.context.get('default_product_id'))
|
||||
for d in dates:
|
||||
if not vals.get(d):
|
||||
vals[d] = dates[d]
|
||||
|
||||
Reference in New Issue
Block a user