forked from Yaltik/golem
Add sequence ordering
This commit is contained in:
parent
482acded87
commit
cc7ac21395
@ -24,6 +24,7 @@ from odoo.exceptions import ValidationError
|
||||
class GolemActivityRegistrationSlot(models.Model):
|
||||
""" GOLEM Activity Registration Slot """
|
||||
_name = 'golem.activity.registration.slot'
|
||||
_order = 'sequence'
|
||||
|
||||
_description = 'GOLEM Activity Registration Slot'
|
||||
activity_id = fields.Many2one('golem.activity', required=True,
|
||||
@ -33,6 +34,7 @@ class GolemActivityRegistrationSlot(models.Model):
|
||||
ondelete='cascade', index=True)
|
||||
hour_start = fields.Float('Start time')
|
||||
hour_stop = fields.Float('Stop time')
|
||||
sequence = fields.Integer('Sequence')
|
||||
|
||||
@api.constrains('hour_start', 'hour_stop')
|
||||
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='registration_slot_ids'>
|
||||
<tree editable='bottom'>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="member_id"/>
|
||||
<field name='hour_start' widget='float_time'/>
|
||||
<field name='hour_stop' widget='float_time'/>
|
||||
|
Loading…
Reference in New Issue
Block a user