Thanks.. this solves many cases where I have to do this.
I defined the function field like this in familymember:
familygroup = fields.Function(
fields.Char('FAMILY GROUP', readonly=True),
'get_familygroup')
def familygroup(self, name):
return "A string"
yet no matter what the getter returns is always show empty in the view form
(both edit and create) any idea what this may be?
Another question..
Let's say that familymember has a unidirectional relationship with Party.
class FamilyMember(ModelSQL, ModelView):
'Family Member'
__name__ = 'custom.family_member'
party = fields.Many2One(
'party.party', 'Party', required=True,
domain=[('is_person', '=', True)],
help='Family Member')
and I have to show the same familygroup description in the party view.
How do I query familymember (or familygroup directly for that matter) from
party?
Thanks