Browse Source

[FIX] b_shift : default_task_type_id computation

pull/125/head
Elouan Le Bars 5 years ago
parent
commit
3ed580f9fd
  1. 7
      beesdoo_shift/models/attendance_sheet.py

7
beesdoo_shift/models/attendance_sheet.py

@ -17,12 +17,11 @@ class AttendanceSheetShift(models.AbstractModel):
def default_task_type_id(self): def default_task_type_id(self):
parameters = self.env["ir.config_parameter"] parameters = self.env["ir.config_parameter"]
id = int( id = int(
parameters.get_param(
"beesdoo_shift.default_task_type_id", default=1
)
parameters.get_param("beesdoo_shift.default_task_type_id", default=False)
) )
task_types = self.env["beesdoo.shift.type"] task_types = self.env["beesdoo.shift.type"]
return task_types.browse(id)
if id:
return task_types.browse(id)
# Related actual shift # Related actual shift
task_id = fields.Many2one("beesdoo.shift.shift", string="Task") task_id = fields.Many2one("beesdoo.shift.shift", string="Task")

Loading…
Cancel
Save