From 57c206039e702d4034bd5e53d9fe364428199832 Mon Sep 17 00:00:00 2001 From: michel Date: Mon, 22 Jan 2018 17:18:49 +0100 Subject: [PATCH] / --- golem_family/models/golem_family.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/golem_family/models/golem_family.py b/golem_family/models/golem_family.py index a13fa55..bce3531 100644 --- a/golem_family/models/golem_family.py +++ b/golem_family/models/golem_family.py @@ -102,8 +102,9 @@ class GolemFamily(models.Model): def onchange_member(self): """ Sets as member address if there was no precedence """ for family in self: - if not any ({'family.street': True}): - self.update({'family.street': family.member_ids.street}) + if not any((family.street, family.street2)): + family.update({'street': family.member_ids[0].street, + 'street2': family.member_ids[0].street2}) class GolemFamilyRole(models.Model): """ GOLEM Family Role """