2 # Parent 8d5573b704b2867788dd6895503f1871c2976a29
4 Index: addons/openacademy/models.py
5 ===================================================================
6 --- addons.orig/openacademy/models.py 2014-08-26 17:26:05.687783287 +0200
7 +++ addons/openacademy/models.py 2014-08-26 17:26:05.679783287 +0200
11 self.taken_seats = 100.0 * len(self.attendee_ids) / self.seats
13 + @api.onchange('seats', 'attendee_ids')
14 + def _verify_valid_seats(self):
18 + 'title': "Incorrect 'seats' value",
19 + 'message': "The number of available seats may not be negative",
22 + if self.seats < len(self.attendee_ids):
25 + 'title': "Too many attendees",
26 + 'message': "Increase seats or remove excess attendees",