summaryrefslogtreecommitdiff
path: root/addons/base_address_extended
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-04-05 18:46:10 +0200
committerChristophe Simonis <chs@odoo.com>2019-04-05 18:46:10 +0200
commit3f95b074e959f0f4ac93fbf4048c0c7276f2c17a (patch)
treef4e793da5d83bcd1bd4347f71cb3f45cbc953df3 /addons/base_address_extended
parent1a871d72438c731d08ef10e668b81b4ade900b85 (diff)
parentf2be461f0906ed47306da58c31240014b6239d80 (diff)
[MERGE] forward port branch saas-12.2 up to f2be461f090
Diffstat (limited to 'addons/base_address_extended')
-rw-r--r--addons/base_address_extended/models/base_address_extended.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/addons/base_address_extended/models/base_address_extended.py b/addons/base_address_extended/models/base_address_extended.py
index 766fac55a8b..0fd99cc8e63 100644
--- a/addons/base_address_extended/models/base_address_extended.py
+++ b/addons/base_address_extended/models/base_address_extended.py
@@ -33,11 +33,6 @@ class Partner(models.Model):
street_number2 = fields.Char('Door', compute='_split_street', help="Door Number",
inverse='_set_street', store=True)
- @api.model
- def _address_fields(self):
- """Returns the list of address fields that are synced from the parent."""
- return super(Partner, self)._address_fields() + ['street_name', 'street_number', 'street_number2']
-
def get_street_fields(self):
"""Returns the fields that can be used in a street format.
Overwrite this function if you want to add your own fields."""
@@ -144,7 +139,7 @@ class Partner(models.Model):
def write(self, vals):
res = super(Partner, self).write(vals)
- if 'country_id' in vals:
+ if 'country_id' in vals and 'street' not in vals:
self._set_street()
return res