[FIX] purchase: origin concatenation
This is related to revision 44eeb38
The origin concatenation was not working
when `procurement.origin` was `False`
opw-666933
This commit is contained in:
parent
f9ee454d42
commit
9f7200a2f6
|
@ -1512,7 +1512,7 @@ class procurement_order(osv.osv):
|
|||
po_id = available_draft_po_ids[0]
|
||||
po_rec = po_obj.browse(cr, uid, po_id, context=context)
|
||||
|
||||
po_to_update = {'origin': po_rec.origin and ', '.join([po_rec.origin, procurement.origin]) or procurement.origin}
|
||||
po_to_update = {'origin': ', '.join(filter(None, [po_rec.origin, procurement.origin]))}
|
||||
#if the product has to be ordered earlier those in the existing PO, we replace the purchase date on the order to avoid ordering it too late
|
||||
if datetime.strptime(po_rec.date_order, DEFAULT_SERVER_DATETIME_FORMAT) > purchase_date:
|
||||
po_to_update.update({'date_order': purchase_date.strftime(DEFAULT_SERVER_DATETIME_FORMAT)})
|
||||
|
|
Loading…
Reference in New Issue