This commit is contained in:
michel 2017-11-27 12:02:39 +01:00
parent 3f7865bba3
commit 8c81f0eee6

View File

@ -15,7 +15,7 @@ class Event(models.Model):
title = fields.Char(required=True) title = fields.Char(required=True)
manager_id = fields.Many2one('coworking.res_partner', 'Manager', index=True, required=True, manager_id = fields.Many2one('res.partner', 'Manager', index=True, required=True,
domain="[('coworker_type', 'in', ['staffer', 'member'])]") domain="[('coworker_type', 'in', ['staffer', 'member'])]")
date_start = fields.Datetime(default=fields.Date.context_today, required=True) date_start = fields.Datetime(default=fields.Date.context_today, required=True)
starts_this_week = fields.Integer(compute='_compute_starts_this_week', starts_this_week = fields.Integer(compute='_compute_starts_this_week',
@ -28,7 +28,7 @@ class Event(models.Model):
('confirmed', 'Confirmed'), ('confirmed', 'Confirmed'),
('canceled', 'Canceled')], default='draft') ('canceled', 'Canceled')], default='draft')
participants_ids = fields.Many2many('coworking.coworker', string='Subscribers') participants_ids = fields.Many2many('res.partner', string='Subscribers')
participants_count = fields.Integer('Number of participants', participants_count = fields.Integer('Number of participants',
compute='_compute_participants_count') compute='_compute_participants_count')