From 77f7da236745aef2f0d91dc7928b66d25c2ab4ef Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Tue, 16 Jul 2013 13:41:00 +0200 Subject: [PATCH] [WIP] res should be rule_id in find_suitable_rule bzr revid: jco@openerp.com-20130716114100-el6k49ozyt5j7k60 --- addons/stock/procurement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/procurement.py b/addons/stock/procurement.py index d6f9875459d..b5f785d245e 100644 --- a/addons/stock/procurement.py +++ b/addons/stock/procurement.py @@ -56,7 +56,7 @@ class procurement_order(osv.osv): def _find_suitable_rule(self, cr, uid, procurement, context=None): rule_id = super(procurement_order, self)._find_suitable_rule(cr, uid, procurement, context=context) - if not res: + if not rule_id: rule_id = self._search_suitable_rule(cr, uid, procurement, [('action', '=', 'move'), ('location_id', '=', procurement.location_id.id)], context=context) rule_id = rule_id and rule_id[0] or False return rule_id