Feedback 1372: Kunden-Änderungen an Portal

develop
Roman Widmann 2018-02-07 14:57:43 +01:00
parent e6f654bc38
commit 76b9e27212
1 changed files with 6 additions and 3 deletions

View File

@ -37,8 +37,10 @@ class PartnerEventListener(Component):
if record.active and record.portal_id:
if 'property_product_pricelist' in fields:
for contact in record.child_ids:
if contact.type != 'delivery':
self.env['res.partner'].with_delay().job_export_portal_price(contact)
if 'parent_id' in fields:
if record.type != 'delivery':
self.env['res.partner'].with_delay().job_export_portal_price(record)
@ -207,6 +209,7 @@ class Partner(models.Model):
def cron_export_portal_prices(self):
partners = self.search([('portal_export_pending', '=', True), ('company_id', '=', self.env.user.company_id.id)])
for partner in partners:
if partner.type != 'delivery':
self.with_delay().job_export_portal_price(partner)
partner.portal_export_pending = False