Skip to content
Snippets Groups Projects
Commit cd66b098 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] base: only sync partners when `type` change

parent 63afaf43
Branches
Tags
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment