diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 10218dba4d7..63131ec104d 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -1517,7 +1517,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': ', '.join(filter(None, [po_rec.origin, procurement.origin]))} + po_to_update = {'origin': ', '.join(filter(None, set([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)})