From c51d031484f5eca7acc111d0a838e38843e12013 Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Wed, 13 Jun 2018 08:30:41 +0200 Subject: [PATCH] SST-3 change handling of attachments as it causes errors if attachments are missing --- ext/custom-addons/dp_custom/models/sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 543ab619..4e04c433 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -220,9 +220,9 @@ class SaleOrder(models.Model): delivery_vals['type'] = 'delivery' delivery_partner = delivery_partner.create(delivery_vals) - attachment_vals = vals.get('attachment_ids', False) + attachment_vals = vals.pop('attachment_ids', False) order_line_vals = vals.get('order_lines', False) - del vals['attachment_ids'] +# if 'attachment_ids' in vals: del vals['attachment_ids'] del vals['order_lines'] self.check_not_specified_fields(vals) vals = self.correct_values(vals)