diff options
| author | Goffin Simon <sig@odoo.com> | 2016-03-25 10:08:00 +0100 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2016-03-29 12:21:49 +0200 |
| commit | 11d3aaf8485ea25dcb45716c18df75fb13d0ba7e (patch) | |
| tree | 124fb077d7688eb6c42b803c7522ed9f89029e09 | |
| parent | c26fa293c8ef309213ed5e096e80ad4307e2682f (diff) | |
[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
| -rw-r--r-- | addons/purchase/purchase.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 0cfcd0bd20e..49653446a80 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -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 |
