Skip to content

Commit

Permalink
[FIX] product_expiry: date on lot
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
nim-odoo committed Jan 16, 2018
1 parent d20c74d commit 6139840
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/product_expiry/models/production_lot.py
Expand Up @@ -44,7 +44,7 @@ def _get_dates(self, product_id=None):
# 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]
Expand Down

0 comments on commit 6139840

Please sign in to comment.