From 365586d11dcc59f1f1c6ebcee12b38902fc608d9 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Sat, 13 Jul 2013 00:30:23 +0200 Subject: [PATCH] [WIP] a note for later bzr revid: qdp-launchpad@openerp.com-20130712223023-61g0nh44nrn1k1v6 --- addons/stock_location/stock_location.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock_location/stock_location.py b/addons/stock_location/stock_location.py index 3cc057dc77d..841b7e69729 100644 --- a/addons/stock_location/stock_location.py +++ b/addons/stock_location/stock_location.py @@ -149,7 +149,8 @@ class procurement_order(osv.osv): return d def _search_suitable_rule(self, cr, uid, procurement, domain, context=None): - '''we try to first find a rule among the ones defined on the procurement order and if none is find, we fallback on the default behavior''' + '''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''' + #TODO check first on procurement order group route_ids = [x.id for x in procurement.product_id.route_ids] res = super(procurement_order, self)._search_suitable_rule(cr, uid, procurement, domain + [('route_id', 'in', route_ids)], context=context) if not res: