[FIX] purchase: origin field on "procurement.order"
The field origin is not required in "procurement.order" and trying to concat a string with a boolean raises a Type Error. opw:670307
This commit is contained in:
@@ -898,7 +898,10 @@ class ProcurementOrder(models.Model):
|
||||
elif not po.origin or procurement.origin not in po.origin.split(', '):
|
||||
# Keep track of all procurements
|
||||
if po.origin:
|
||||
po.write({'origin': po.origin + ', ' + procurement.origin})
|
||||
if procurement.origin:
|
||||
po.write({'origin': po.origin + ', ' + procurement.origin})
|
||||
else:
|
||||
po.write({'origin': po.origin})
|
||||
else:
|
||||
po.write({'origin': procurement.origin})
|
||||
res += po.ids
|
||||
|
||||
Reference in New Issue
Block a user