forked from Yaltik/golem
[IMP]GOLEM Members and Activities : prevent season removal if there are linked members
This commit is contained in:
parent
8c3107f439
commit
f173f25c2d
@ -47,7 +47,8 @@ class GolemActivity(models.Model):
|
||||
return self.env['golem.season'].search(domain)
|
||||
|
||||
season_id = fields.Many2one('golem.season', string='Season', copy=False,
|
||||
required=True, default=_default_season)
|
||||
required=True, default=_default_season,
|
||||
ondelete='restrict')
|
||||
animator_id = fields.Many2one('res.partner', string='Animator',
|
||||
domain=[('is_company', '=', False)])
|
||||
date_start = fields.Date('Start date', copy=False)
|
||||
|
@ -67,7 +67,8 @@ class GolemMember(models.Model):
|
||||
opt_out_sms = fields.Boolean('Out of SMS campaigns')
|
||||
season_ids = fields.Many2many('golem.season', string='Seasons',
|
||||
required=True, auto_join=True,
|
||||
default=_default_season)
|
||||
default=_default_season,
|
||||
ondelete='restrict')
|
||||
is_current = fields.Boolean('Current user?', default=False, readonly=True,
|
||||
store=True, compute='_compute_is_current')
|
||||
is_number_manual = fields.Boolean('Is number manual?', store=False,
|
||||
|
Loading…
Reference in New Issue
Block a user