From e588d85315968f48c98e96b23f4153ee93d950d3 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 2 May 2016 13:16:09 +0200 Subject: [PATCH] [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 --- addons/product_expiry/product_expiry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_expiry/product_expiry.py b/addons/product_expiry/product_expiry.py index d24640f85ed..104b938c67c 100644 --- a/addons/product_expiry/product_expiry.py +++ b/addons/product_expiry/product_expiry.py @@ -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 = {