[IMP]No need onchange type for GOLEM Activity

This commit is contained in:
Fabien Bourgeois 2016-06-28 19:56:27 +02:00
parent fd775e5a08
commit 0dfc1078fd

View File

@ -34,7 +34,7 @@ class GolemActivity(models.Model):
season_id = fields.Many2one('golem.season', string='Seasons',
required=True)
animator_id = fields.Many2one('res.partner', string="Animator",
animator_id = fields.Many2one('res.partner', string='Animator',
domain=[('is_company', '=', False)])
date_start = fields.Date('Start date')
date_end = fields.Date('End date')
@ -47,12 +47,6 @@ class GolemActivity(models.Model):
raise models.ValidationError(_('Start of the period cannot be '
'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')
def onchange_season_dates(self):
""" Sets defaults dates according to season """