From 515876e6c9e99e13daf08664a95205d76bb1c85c Mon Sep 17 00:00:00 2001 From: Simon Diesenreiter Date: Sat, 24 May 2025 21:26:57 +0200 Subject: [PATCH] fix: broken source code indentation, refs NOISSUE --- src/addons/base/models/res_partner.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/addons/base/models/res_partner.py b/src/addons/base/models/res_partner.py index dc9d365..81e048c 100644 --- a/src/addons/base/models/res_partner.py +++ b/src/addons/base/models/res_partner.py @@ -479,15 +479,15 @@ class Partner(models.Model): 'was never correctly set. If an existing contact starts working for a new ' 'company then a new contact should be created under that new ' 'company. You can use the "Discard" button to abandon this change.')} - if partner.type == 'contact' or self.type == 'contact': - # for contacts: copy the parent address, if set (aka, at least one - # value is set in the address: otherwise, keep the one from the - # contact) - #address_fields = self._address_fields() - #if any(self.parent_id[key] for key in address_fields): - # def convert(value): - # return value.id if isinstance(value, models.BaseModel) else value - # result['value'] = {key: convert(self.parent_id[key]) for key in address_fields} + #if partner.type == 'contact' or self.type == 'contact': + # # for contacts: copy the parent address, if set (aka, at least one + # # value is set in the address: otherwise, keep the one from the + # # contact) + # address_fields = self._address_fields() + # if any(self.parent_id[key] for key in address_fields): + # def convert(value): + # return value.id if isinstance(value, models.BaseModel) else value + # result['value'] = {key: convert(self.parent_id[key]) for key in address_fields} return result @api.onchange('parent_id')