From 3ba9dba798268f54c3136bef0aa5157aa82cba23 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 5 Sep 2016 15:57:50 +0200 Subject: [PATCH] [FIX] stock: fix traceability smartbutton domain `product_id.product_tmpl_id` expects ids of `product.template` while `products.ids` are ids of `product.product`. This is an oversight during the migration to the new API of this module in the below revision: b9853db8b53fc468c6118f5ed67b89748a40805c opw-687444 --- addons/stock/models/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py index 49d1a4c70b1..831d6f15b68 100644 --- a/addons/stock/models/product.py +++ b/addons/stock/models/product.py @@ -504,7 +504,7 @@ class ProductTemplate(models.Model): action = self.env.ref('stock.act_product_stock_move_open').read()[0] if self: action['context'] = {'default_product_id': products.ids[0]} - action['domain'] = [('product_id.product_tmpl_id', 'in', products.ids)] + action['domain'] = [('product_id.product_tmpl_id', 'in', self.ids)] return action