[FIX] base: only sync partners when type change

This commit is contained in:
Christophe Simonis
2018-09-11 17:08:14 +02:00
parent 63afaf438b
commit cd66b0984e
+1 -1
View File
@@ -443,7 +443,7 @@ class Partner(models.Model, FormatAddress):
""" Sync commercial fields and address fields from company and to children after create/update,
just as if those were all modeled as fields.related to the parent """
# 1. From UPSTREAM: sync from parent
if values.get('parent_id') or values.get('type', 'contact'):
if values.get('parent_id') or values.get('type') == 'contact':
# 1a. Commercial fields: sync if parent changed
if values.get('parent_id'):
self._commercial_sync_from_company()