From 6b458cefcddb0ed0c3dbca2104a2ec78a82a993f Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Fri, 13 Sep 2013 12:12:11 +0200 Subject: [PATCH] [FIX] Routes should include procurement routes bzr revid: jco@openerp.com-20130913101211-586hcz2j9n86s1mv --- addons/stock_location/stock_location.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_location/stock_location.py b/addons/stock_location/stock_location.py index cf6cd4b0afa..db5ef8517d7 100644 --- a/addons/stock_location/stock_location.py +++ b/addons/stock_location/stock_location.py @@ -153,7 +153,7 @@ class procurement_order(osv.osv): '''we try to first find a rule among the ones defined on the procurement order group and if none is found, we try on the routes defined for the product, and finally we fallback on the default behavior''' categ_obj = self.pool.get("product.category") categ_id = procurement.product_id.categ_id.id - route_ids = [x.id for x in procurement.product_id.route_ids + procurement.product_id.categ_id.total_route_ids] + route_ids = [x.id for x in procurement.route_ids + procurement.product_id.route_ids + procurement.product_id.categ_id.total_route_ids] res = self.pool.get('procurement.rule').search(cr, uid, domain + [('route_id', 'in', route_ids)], order = 'route_sequence, sequence', context=context) if not res: res = self.pool.get('procurement.rule').search(cr, uid, domain + [('route_id', '=', False)], order='sequence', context=context)