From 1fcf5bdadc5a7f07b7a41bbd0c25c6fbe5127652 Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Mon, 5 Oct 2015 16:54:06 +0200 Subject: [PATCH] [FIX] procurement: no procurement rule needed for digital products The refactoring of product added a new type of product besides stockable/consumable/service: digital It usually behaves like a service, for example it does not need a procurement rule (which is the point of this fix) --- addons/procurement/procurement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index 67271810c0a..9ca71bdfe74 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -255,7 +255,7 @@ class procurement_order(osv.osv): #if the procurement already has a rule assigned, we keep it (it has a higher priority as it may have been chosen manually) if procurement.rule_id: return True - elif procurement.product_id.type != 'service': + elif procurement.product_id.type not in ('service', 'digital'): rule_id = self._find_suitable_rule(cr, uid, procurement, context=context) if rule_id: self.write(cr, uid, [procurement.id], {'rule_id': rule_id}, context=context)