Browse Source

[ADD] b_shift : _order for attendance sheet shifts

pull/143/head
Elouan Le Bars 5 years ago
parent
commit
002bc8ae06
  1. 2
      beesdoo_shift/models/attendance_sheet.py

2
beesdoo_shift/models/attendance_sheet.py

@ -11,6 +11,7 @@ from openerp.exceptions import UserError, ValidationError
class AttendanceSheetShift(models.AbstractModel): class AttendanceSheetShift(models.AbstractModel):
_name = "beesdoo.shift.sheet.shift" _name = "beesdoo.shift.sheet.shift"
_description = "Copy of an actual shift into an attendance sheet" _description = "Copy of an actual shift into an attendance sheet"
_order = 'task_type_id, worker_name'
@api.model @api.model
def default_task_type_id(self): def default_task_type_id(self):
@ -45,6 +46,7 @@ class AttendanceSheetShift(models.AbstractModel):
], ],
required=True, required=True,
) )
worker_name = fields.Char(related="worker_id.name", store=True)
task_type_id = fields.Many2one( task_type_id = fields.Many2one(
"beesdoo.shift.type", string="Task Type", default=default_task_type_id "beesdoo.shift.type", string="Task Type", default=default_task_type_id
) )

Loading…
Cancel
Save