Skip to content
Snippets Groups Projects
Commit 61398407 authored by Nicolas Martinelli's avatar Nicolas Martinelli Committed by Nicolas Martinelli
Browse files

[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
parent d20c74dd
Branches
Tags
No related merge requests found
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment