forked from Yaltik/golem
[IMP]GOLEM Family : limit families choice to persons
This commit is contained in:
parent
5790393126
commit
35c52a25d5
@ -74,7 +74,8 @@ class GolemFamily(models.Model):
|
||||
email = fields.Char('Email')
|
||||
website = fields.Char('Website')
|
||||
|
||||
member_ids = fields.One2many('res.partner', 'family_id', 'Members')
|
||||
member_ids = fields.One2many('res.partner', 'family_id', 'Members',
|
||||
domain=[('is_company', '=', False)])
|
||||
note = fields.Text('Note')
|
||||
count = fields.Integer('Count', compute='_compute_count', store=True)
|
||||
|
||||
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<field name="partner_id" invisible="True" />
|
||||
</field>
|
||||
<field name="legal_guardian" position="attributes">
|
||||
<attribute name="domain">['&', ('is_company', '=', False), ('family_id', '=', family_id), ('id', '!=', partner_id)]</attribute>
|
||||
<attribute name="domain">['&', ('family_id', '=', family_id), ('id', '!=', partner_id)]</attribute>
|
||||
<attribute name="options">{'no_create': True}</attribute>
|
||||
</field>
|
||||
</field>
|
||||
|
@ -24,7 +24,7 @@ class GolemMember(models.Model):
|
||||
|
||||
ADULT_DURATION = timedelta(days=365*18)
|
||||
legal_guardian = fields.Many2one('res.partner', 'Legal guardian',
|
||||
domain="[('is_company', '=', False)]")
|
||||
domain=[('is_company', '=', False)])
|
||||
activities_participation = fields.Boolean('Activities participation?')
|
||||
is_minor = fields.Boolean('Is minor?', compute='_compute_is_minor',
|
||||
store=True, default=False)
|
||||
|
Loading…
Reference in New Issue
Block a user