[IMP] When stock is installed and there is a rule for a product of type service, do not apply rule
bzr revid: jco@openerp.com-20130916093710-6gweaj5o0yp20ry5
This commit is contained in:
@@ -194,10 +194,11 @@ class procurement_order(osv.osv):
|
||||
:param procurement: browse record
|
||||
:rtype: boolean
|
||||
'''
|
||||
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)
|
||||
return True
|
||||
if procurement.product_id.type != 'service':
|
||||
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)
|
||||
return True
|
||||
return False
|
||||
|
||||
def _run(self, cr, uid, procurement, context=None):
|
||||
|
||||
@@ -165,7 +165,7 @@ class sale_order(osv.osv):
|
||||
def _check_create_procurement(self, cr, uid, order, line, context=None):
|
||||
create = super(sale_order, self)._check_create_procurement(cr, uid, order, line, context=context)
|
||||
if (line.product_id.type== "service" and not line.product_id.auto_create_task):
|
||||
create = True
|
||||
create = False
|
||||
return create
|
||||
|
||||
def _picked_rate(self, cr, uid, ids, name, arg, context=None):
|
||||
|
||||
Reference in New Issue
Block a user