From a4e888516aced20f2a4ab11267088cede5f1e5c0 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Mon, 8 Sep 2014 18:43:28 +0200 Subject: [PATCH] fix domain using list instead of string --- stock_reserve/model/product.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stock_reserve/model/product.py b/stock_reserve/model/product.py index 4e7fbd982..fd9ea385b 100644 --- a/stock_reserve/model/product.py +++ b/stock_reserve/model/product.py @@ -45,8 +45,7 @@ class ProductTemplate(models.Model): ref = 'stock_reserve.action_stock_reservation_tree' product_ids = self._get_products() action_dict = self._get_act_window_dict(ref) - action_dict['domain'] = ("[('product_id','in',[" + - ','.join(map(str, product_ids)) + "])]") + action_dict['domain'] = [('product_id', 'in', product_ids)] action_dict['context'] = { 'search_default_draft': 1, 'search_default_reserved': 1 @@ -77,7 +76,7 @@ class ProductProduct(models.Model): ref = 'stock_reserve.action_stock_reservation_tree' product_id = self._ids[0] action_dict = self.product_tmpl_id._get_act_window_dict(ref) - action_dict['domain'] = "[('product_id','=', %s)]" % product_id + action_dict['domain'] = [('product_id', '=', product_id)] action_dict['context'] = { 'search_default_draft': 1, 'search_default_reserved': 1