From e5d2e1ffc42e3f30277b21e9a4bbe3abb49d8b87 Mon Sep 17 00:00:00 2001 From: Ahmed Aly Date: Wed, 11 Apr 2018 14:12:02 +0200 Subject: [PATCH] =?UTF-8?q?Feedback=201615:=20SST-03:=20Namen=20wir=20nich?= =?UTF-8?q?t=20bef=C3=BCllt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/custom-addons/dp_custom/models/res_partner.py | 2 +- ext/custom-addons/dp_custom/models/sale.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/custom-addons/dp_custom/models/res_partner.py b/ext/custom-addons/dp_custom/models/res_partner.py index 4e594046..a7047568 100644 --- a/ext/custom-addons/dp_custom/models/res_partner.py +++ b/ext/custom-addons/dp_custom/models/res_partner.py @@ -255,7 +255,7 @@ class Partner(models.Model): 'retail_partner_id', 'retailer', 'info_uid', 'name2', 'carrier_id']) return common_list elif self.env.context.get('sst_14', False): - common_list.extend(['firstname', 'lastname', 'midname', 'company_odoo_id', 'portal_id']) + common_list.extend(['firstname', 'lastname', 'midname', 'company_odoo_id']) return common_list else: return super(Partner, self)._get_specified_fields() diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 71bff992..fb2266d6 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -168,7 +168,7 @@ class SaleOrder(models.Model): if key.startswith('delivery_'): delivery_vals[key.replace('delivery_', '')] = vals[key] - delivery_vals = delivery_partner.with_context(sst_1=True).remove_not_specified_fields(delivery_vals) + delivery_vals = delivery_partner.with_context(sst_14=True).remove_not_specified_fields(delivery_vals) delivery_vals = delivery_partner.correct_values(delivery_vals) delivery_vals['parent_id'] = partner.id @@ -452,7 +452,6 @@ class SaleOrderLine(models.Model): 'price_unit': -invoice_lines.price_subtotal * (discount / 100), 'uom_id': self.env.ref('product.product_uom_unit').id, 'name': 'Händlerrabatt {}%'.format(discount), - 'intrastat_id': False }) del vals['discount'] invoice_lines |= self.env['account.invoice.line'].create(vals)