forked from Yaltik/golem
[IMP]No need onchange type for GOLEM Activity
This commit is contained in:
parent
fd775e5a08
commit
0dfc1078fd
@ -34,7 +34,7 @@ class GolemActivity(models.Model):
|
|||||||
|
|
||||||
season_id = fields.Many2one('golem.season', string='Seasons',
|
season_id = fields.Many2one('golem.season', string='Seasons',
|
||||||
required=True)
|
required=True)
|
||||||
animator_id = fields.Many2one('res.partner', string="Animator",
|
animator_id = fields.Many2one('res.partner', string='Animator',
|
||||||
domain=[('is_company', '=', False)])
|
domain=[('is_company', '=', False)])
|
||||||
date_start = fields.Date('Start date')
|
date_start = fields.Date('Start date')
|
||||||
date_end = fields.Date('End date')
|
date_end = fields.Date('End date')
|
||||||
@ -47,12 +47,6 @@ class GolemActivity(models.Model):
|
|||||||
raise models.ValidationError(_('Start of the period cannot be '
|
raise models.ValidationError(_('Start of the period cannot be '
|
||||||
'after end of the period.'))
|
'after end of the period.'))
|
||||||
|
|
||||||
@api.onchange('type')
|
|
||||||
def onchange_type(self):
|
|
||||||
""" Force service as type """
|
|
||||||
for a in self:
|
|
||||||
self.type = 'service'
|
|
||||||
|
|
||||||
@api.onchange('season_id')
|
@api.onchange('season_id')
|
||||||
def onchange_season_dates(self):
|
def onchange_season_dates(self):
|
||||||
""" Sets defaults dates according to season """
|
""" Sets defaults dates according to season """
|
||||||
|
Loading…
Reference in New Issue
Block a user