[TMP]Display family info in member

This commit is contained in:
michel 2018-01-25 10:02:03 +01:00
parent 79222a4b94
commit 3b300442b2
2 changed files with 20 additions and 0 deletions

View File

@ -30,6 +30,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
context="{'default_member_ids': [(4, partner_id, False)]}"/>
<field name="family_role" />
</field>
<notebook>
<page string="Family members">
<group>
<field name="family_id" />
</group>
<field name="member_ids" context="{'default_family_id': active_id}">
<tree delete="false">
<field name="name" />
<field name="family_role" />
<field name="phone" />
<field name="mobile" />
<field name="email" widget="email" />
</tree>
</field>
</page>
</notebook>
</field>
</record>

View File

@ -80,6 +80,9 @@ class GolemMember(models.Model):
partner_id = fields.Many2one('res.partner', required=True, index=True,
ondelete='cascade')
member_ids = fields.One2many('res.partner', 'family_id', 'Members',
domain=[('is_company', '=', False)])
@api.model
def _default_season(self):
""" Get default season """