Activités : inscription par créneau interne #41
@ -24,6 +24,7 @@ from odoo.exceptions import ValidationError
|
|||||||
class GolemActivityRegistrationSlot(models.Model):
|
class GolemActivityRegistrationSlot(models.Model):
|
||||||
""" GOLEM Activity Registration Slot """
|
""" GOLEM Activity Registration Slot """
|
||||||
_name = 'golem.activity.registration.slot'
|
_name = 'golem.activity.registration.slot'
|
||||||
|
_order = 'sequence'
|
||||||
|
|
||||||
_description = 'GOLEM Activity Registration Slot'
|
_description = 'GOLEM Activity Registration Slot'
|
||||||
activity_id = fields.Many2one('golem.activity', required=True,
|
activity_id = fields.Many2one('golem.activity', required=True,
|
||||||
@ -33,6 +34,7 @@ class GolemActivityRegistrationSlot(models.Model):
|
|||||||
ondelete='cascade', index=True)
|
ondelete='cascade', index=True)
|
||||||
hour_start = fields.Float('Start time')
|
hour_start = fields.Float('Start time')
|
||||||
hour_stop = fields.Float('Stop time')
|
hour_stop = fields.Float('Stop time')
|
||||||
|
sequence = fields.Integer('Sequence')
|
||||||
|
|
||||||
@api.constrains('hour_start', 'hour_stop')
|
@api.constrains('hour_start', 'hour_stop')
|
||||||
def check_slot_hours(self):
|
def check_slot_hours(self):
|
||||||
|
@ -37,6 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<field name='slots_duration' widget='float_time'/>
|
<field name='slots_duration' widget='float_time'/>
|
||||||
<field name='registration_slot_ids'>
|
<field name='registration_slot_ids'>
|
||||||
<tree editable='bottom'>
|
<tree editable='bottom'>
|
||||||
|
<field name="sequence" widget="handle"/>
|
||||||
<field name="member_id"/>
|
<field name="member_id"/>
|
||||||
<field name='hour_start' widget='float_time'/>
|
<field name='hour_start' widget='float_time'/>
|
||||||
<field name='hour_stop' widget='float_time'/>
|
<field name='hour_stop' widget='float_time'/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user