From edda5283c6c78a55e2178ee5f37f269b92e4cc91 Mon Sep 17 00:00:00 2001 From: Roman Widmann Date: Wed, 7 Feb 2018 16:22:14 +0100 Subject: [PATCH] =?UTF-8?q?Feedback=201337:=20Portalkontakte=20k=C3=B6nnen?= =?UTF-8?q?=20selbst=20Unternehmen=20sein?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/custom-addons/dp_custom/models/res_partner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/custom-addons/dp_custom/models/res_partner.py b/ext/custom-addons/dp_custom/models/res_partner.py index 5369e544..82aea8a7 100644 --- a/ext/custom-addons/dp_custom/models/res_partner.py +++ b/ext/custom-addons/dp_custom/models/res_partner.py @@ -35,6 +35,9 @@ class PartnerEventListener(Component): def on_record_write(self, record, fields=None): if record.active and record.portal_id: + if 'company_type' in fields: + if record.company_type == 'company' and record.type != 'delivery': + self.env['res.partner'].with_delay().job_export_portal_price(record) if 'property_product_pricelist' in fields: for contact in record.child_ids: if contact.type != 'delivery':