From f85cb1c7a878979e9a92095bfa167d0252e369e6 Mon Sep 17 00:00:00 2001 From: JasminSForgeFlow Date: Tue, 1 Aug 2023 17:50:54 +0530 Subject: [PATCH] [MIG] hr_timesheet_sheet_attendance: Migration to 15.0 --- hr_timesheet_sheet_attendance/__manifest__.py | 2 +- hr_timesheet_sheet_attendance/models/hr_timesheet_sheet.py | 5 +---- hr_timesheet_sheet_attendance/readme/INSTALL.rst | 2 +- hr_timesheet_sheet_attendance/readme/ROADMAP.rst | 1 + hr_timesheet_sheet_attendance/readme/USAGE.rst | 2 +- .../tests/hr_timesheet_sheet_test_cases.py | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 hr_timesheet_sheet_attendance/readme/ROADMAP.rst diff --git a/hr_timesheet_sheet_attendance/__manifest__.py b/hr_timesheet_sheet_attendance/__manifest__.py index 012fee1a8..8d91086b3 100644 --- a/hr_timesheet_sheet_attendance/__manifest__.py +++ b/hr_timesheet_sheet_attendance/__manifest__.py @@ -1,6 +1,6 @@ { "name": "HR Timesheet Sheet Attendance", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "category": "Human Resources", "sequence": 80, "license": "AGPL-3", diff --git a/hr_timesheet_sheet_attendance/models/hr_timesheet_sheet.py b/hr_timesheet_sheet_attendance/models/hr_timesheet_sheet.py index 8c86a8e6e..3673ec2bd 100644 --- a/hr_timesheet_sheet_attendance/models/hr_timesheet_sheet.py +++ b/hr_timesheet_sheet_attendance/models/hr_timesheet_sheet.py @@ -45,7 +45,6 @@ def _compute_attendance_time(self): total_attendance = fields.Float( compute="_compute_attendance_time", - string="Total Attendance", ) total_difference = fields.Float( compute="_compute_attendance_time", @@ -57,9 +56,7 @@ def _compute_attendance_time(self): attendance_state = fields.Selection( related="employee_id.attendance_state", string="Current Status" ) - attendance_count = fields.Integer( - compute="_compute_attendance_count", string="Attendance Count" - ) + attendance_count = fields.Integer(compute="_compute_attendance_count") def attendance_action_change(self): """Call attendance_action_change to diff --git a/hr_timesheet_sheet_attendance/readme/INSTALL.rst b/hr_timesheet_sheet_attendance/readme/INSTALL.rst index c86e58ef9..1f14a7377 100644 --- a/hr_timesheet_sheet_attendance/readme/INSTALL.rst +++ b/hr_timesheet_sheet_attendance/readme/INSTALL.rst @@ -1,4 +1,4 @@ This module relies on: * The OCA module 'HR Timesheet Sheet', and can be downloaded from - Github: https://github.com/OCA/hr-timesheet/tree/12.0/hr_timesheet_sheet + Github: https://github.com/OCA/hr-timesheet/tree/15.0/hr_timesheet_sheet diff --git a/hr_timesheet_sheet_attendance/readme/ROADMAP.rst b/hr_timesheet_sheet_attendance/readme/ROADMAP.rst new file mode 100644 index 000000000..874991c9a --- /dev/null +++ b/hr_timesheet_sheet_attendance/readme/ROADMAP.rst @@ -0,0 +1 @@ +By having Check-in/out button in the timesheet, there could perhaps be a case where the user does two clicks in a fast way, then the check-in and check-out times are the same and the attendance gets blocked as there is an Odoo standard check which verifies that the attendance check-in time is strictly minor than the check-out time diff --git a/hr_timesheet_sheet_attendance/readme/USAGE.rst b/hr_timesheet_sheet_attendance/readme/USAGE.rst index c159e7055..1f28a7999 100644 --- a/hr_timesheet_sheet_attendance/readme/USAGE.rst +++ b/hr_timesheet_sheet_attendance/readme/USAGE.rst @@ -8,5 +8,5 @@ * Two smart buttons are present on top-right corner of timesheet form - First one(with time icon) will take you list of your timesheets (by default filter timesheets related to current timesheet-sheet) - Second one(labeled as Attendances) will take you to list of your attendances (by default filter ateendances related to current timesheet-sheet) -* It prevents to change in any attendance ralted to timesheet-sheet that already has submitted +* It prevents to change in any attendance related to timesheet-sheet that already has submitted * It also prevents to submit such a timesheet-sheet not having equal number of checkin and checkout diff --git a/hr_timesheet_sheet_attendance/tests/hr_timesheet_sheet_test_cases.py b/hr_timesheet_sheet_attendance/tests/hr_timesheet_sheet_test_cases.py index 1d28fdda9..bbe6ca25c 100644 --- a/hr_timesheet_sheet_attendance/tests/hr_timesheet_sheet_test_cases.py +++ b/hr_timesheet_sheet_attendance/tests/hr_timesheet_sheet_test_cases.py @@ -45,7 +45,7 @@ def _create_employee(self, user): "department_id": self.env.ref("hr.dep_rd").id, "job_id": self.env.ref("hr.job_developer").id, "category_ids": [(6, 0, [self.env.ref("hr.employee_category_4").id])], - "work_location": "Building 1, Second Floor", + "work_location_id": self.env.ref("hr.work_location_1").id, "work_email": "test@test.com", "work_phone": "+3281813700", }