[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)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user