[FIX] product_expiry: 'product_id' in context

When creating a new lot from an incoming picking transfer, the product_id
is written in the context.

opw:674608
This commit is contained in:
Goffin Simon 2016-05-02 13:16:09 +02:00
parent a4c4c43bd9
commit e588d85315
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class stock_production_lot(osv.osv):
# Assign dates according to products data
def create(self, cr, uid, vals, context=None):
context = dict(context or {})
context['product_id'] = vals.get('product_id', context.get('default_product_id'))
context['product_id'] = vals.get('product_id', context.get('default_product_id') or context.get('product_id'))
return super(stock_production_lot, self).create(cr, uid, vals, context=context)
_defaults = {