From 0dfc1078fd30dfdd2c4cde73e0487e54ad8e9df3 Mon Sep 17 00:00:00 2001 From: Fabien Bourgeois Date: Tue, 28 Jun 2016 19:56:27 +0200 Subject: [PATCH] [IMP]No need onchange type for GOLEM Activity --- golem_activity/models/golem_activity.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/golem_activity/models/golem_activity.py b/golem_activity/models/golem_activity.py index 069d68d..a6d6a53 100644 --- a/golem_activity/models/golem_activity.py +++ b/golem_activity/models/golem_activity.py @@ -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 """