forked from Yaltik/golem
/
This commit is contained in:
parent
30dad99689
commit
3c795728b5
@ -98,20 +98,12 @@ class GolemFamily(models.Model):
|
|||||||
for family in self:
|
for family in self:
|
||||||
family.count = len(family.member_ids)
|
family.count = len(family.member_ids)
|
||||||
|
|
||||||
@api.onchange('member_ids')
|
# @api.onchange('member_ids')
|
||||||
def onchange_member(self):
|
# def onchange_member(self):
|
||||||
""" Sets as member address if there was no precedence """
|
# """ Sets as member address if there was no precedence """
|
||||||
for family in self:
|
# for family in self:
|
||||||
if family.id:
|
# if not any({'family.street': False}):
|
||||||
if not any({'family.street': False, 'family.street2': False, \
|
# self.update({'family.street': family.member_ids.street})
|
||||||
'family.zip': False, 'family.city': False, \
|
|
||||||
'family.state_id': False, 'family.country_id': False}):
|
|
||||||
family.street = family.member_ids.street
|
|
||||||
family.street2 = family.member_ids.street2
|
|
||||||
family.zip = family.member_ids.zip
|
|
||||||
family.city = family.member_ids.city
|
|
||||||
family.state_id = family.member_ids.state_id
|
|
||||||
family.country_id = family.member_ids.country_id
|
|
||||||
|
|
||||||
class GolemFamilyRole(models.Model):
|
class GolemFamilyRole(models.Model):
|
||||||
""" GOLEM Family Role """
|
""" GOLEM Family Role """
|
||||||
|
@ -31,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</field>
|
</field>
|
||||||
<notebook>
|
<notebook>
|
||||||
<page string="Family members">
|
<page string="Family members">
|
||||||
<field name="family_lines" nolabel="1" colspan="4" readonly="1">
|
|
||||||
<tree string="Family">
|
<tree string="Family">
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
<field name="family_role" />
|
<field name="family_role" />
|
||||||
@ -43,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<field name="mobile" />
|
<field name="mobile" />
|
||||||
<field name="email" widget="email" />
|
<field name="email" widget="email" />
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
|
||||||
</page>
|
</page>
|
||||||
</notebook>
|
</notebook>
|
||||||
</field>
|
</field>
|
||||||
|
Loading…
Reference in New Issue
Block a user