|
|
@ -14,28 +14,9 @@ class TestBeesdooShift(TransactionCase): |
|
|
|
super(TestBeesdooShift, self).setUp() |
|
|
|
self.shift_model = self.env["beesdoo.shift.shift"] |
|
|
|
self.shift_template_model = self.env["beesdoo.shift.template"] |
|
|
|
self.attendance_sheet_model = self.env["beesdoo.shift.sheet"] |
|
|
|
self.attendance_sheet_shift_model = self.env[ |
|
|
|
"beesdoo.shift.sheet.shift" |
|
|
|
] |
|
|
|
self.shift_expected_model = self.env["beesdoo.shift.sheet.expected"] |
|
|
|
self.shift_added_model = self.env["beesdoo.shift.sheet.added"] |
|
|
|
self.task_type_default_id = self.env["ir.config_parameter"].sudo().get_param( |
|
|
|
"beesdoo_shift.task_type_default_id" |
|
|
|
) |
|
|
|
|
|
|
|
self.current_time = datetime.now() |
|
|
|
self.user_admin = self.env.ref("base.user_root") |
|
|
|
self.user_generic = self.env.ref( |
|
|
|
"beesdoo_base.beesdoo_shift_user_1_demo" |
|
|
|
) |
|
|
|
self.user_permanent = self.env.ref( |
|
|
|
"beesdoo_base.beesdoo_shift_user_2_demo" |
|
|
|
) |
|
|
|
|
|
|
|
self.setting_wizard = self.env["beesdoo.shift.config.settings"].sudo( |
|
|
|
self.user_admin |
|
|
|
) |
|
|
|
|
|
|
|
self.worker_regular_1 = self.env.ref( |
|
|
|
"beesdoo_base.res_partner_cooperator_6_demo" |
|
|
@ -67,10 +48,10 @@ class TestBeesdooShift(TransactionCase): |
|
|
|
) |
|
|
|
|
|
|
|
self.task_template_1 = self.env.ref( |
|
|
|
"beesdoo_shift.beesdoo_shift_task_template_1_demo" |
|
|
|
"beesdoo_worker_status.beesdoo_shift_task_template_1_demo" |
|
|
|
) |
|
|
|
self.task_template_2 = self.env.ref( |
|
|
|
"beesdoo_shift.beesdoo_shift_task_template_2_demo" |
|
|
|
"beesdoo_worker_status.beesdoo_shift_task_template_2_demo" |
|
|
|
) |
|
|
|
|
|
|
|
# Set time in and out of generation interval parameter |
|
|
@ -116,7 +97,7 @@ class TestBeesdooShift(TransactionCase): |
|
|
|
"replaced_id": self.worker_regular_2.id, |
|
|
|
} |
|
|
|
) |
|
|
|
future_shift_regular = self.shift_model.create( |
|
|
|
self.future_shift_regular = self.shift_model.create( |
|
|
|
{ |
|
|
|
"task_template_id": self.task_template_2.id, |
|
|
|
"task_type_id": self.task_type_1.id, |
|
|
|