From 4a748da18ded465626aa69be887c5107ad6340f0 Mon Sep 17 00:00:00 2001 From: VoicuStefan2001 Date: Wed, 28 Feb 2024 14:50:33 +0200 Subject: [PATCH] [UPD] deltatech_work_days_report --- deltatech_work_days_report/README.rst | 8 +++++++- deltatech_work_days_report/models/hr_employee.py | 6 ++++++ deltatech_work_days_report/readme/DESCRIPTION.rst | 6 ++++++ .../security/ir.model.access.csv | 2 +- .../static/description/index.html | 13 ++++++++++++- deltatech_work_days_report/views/hr_employee.xml | 10 ++++++++++ .../wizard/export_working_days.py | 10 +++++++--- 7 files changed, 49 insertions(+), 6 deletions(-) diff --git a/deltatech_work_days_report/README.rst b/deltatech_work_days_report/README.rst index 1257da033b..09a8094300 100644 --- a/deltatech_work_days_report/README.rst +++ b/deltatech_work_days_report/README.rst @@ -7,7 +7,7 @@ Work Days Report !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:142a4e37640663f59f9e7d67587c410b09388e09df0294e86ff5993560ab339c + !! source digest: sha256:8e724a4f70b41fc67f801cfabfeea93e245d52bfd5d0db7370b95717f3231fee !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -22,6 +22,12 @@ Work Days Report |badge1| |badge2| |badge3| +This module: + - adds the field "code" in the Time Off Type form + - in the employee menu in list view you can select employees then press "Action" -> "Export Working Days" to + make an Excel file that contains the employees with their hours worked per day number of hours worked in total + , the number of meal vouchers earn by the employee and see the days they were on time off + - if the code field in Time Off Type form is empty the cell will have "ABS" instead of the type of time off code **Table of contents** diff --git a/deltatech_work_days_report/models/hr_employee.py b/deltatech_work_days_report/models/hr_employee.py index 62d8e1ab93..2fbc04220d 100644 --- a/deltatech_work_days_report/models/hr_employee.py +++ b/deltatech_work_days_report/models/hr_employee.py @@ -7,3 +7,9 @@ class HREmployee(models.Model): hours_per_day = fields.Selection( [("4", "4 Hours"), ("6", "6 Hours"), ("8", "8 Hours")], string="Hours per Day", default="8" ) + + +class HRLeaveType(models.Model): + _inherit = "hr.leave.type" + + type_code = fields.Char(string="Code") diff --git a/deltatech_work_days_report/readme/DESCRIPTION.rst b/deltatech_work_days_report/readme/DESCRIPTION.rst index e69de29bb2..9803f18a86 100644 --- a/deltatech_work_days_report/readme/DESCRIPTION.rst +++ b/deltatech_work_days_report/readme/DESCRIPTION.rst @@ -0,0 +1,6 @@ +This module: + - adds the field "code" in the Time Off Type form + - in the employee menu in list view you can select employees then press "Action" -> "Export Working Days" to + make an Excel file that contains the employees with their hours worked per day number of hours worked in total + , the number of meal vouchers earn by the employee and see the days they were on time off + - if the code field in Time Off Type form is empty the cell will have "ABS" instead of the type of time off code diff --git a/deltatech_work_days_report/security/ir.model.access.csv b/deltatech_work_days_report/security/ir.model.access.csv index 0ef28eb7b9..b4025b5860 100644 --- a/deltatech_work_days_report/security/ir.model.access.csv +++ b/deltatech_work_days_report/security/ir.model.access.csv @@ -1,2 +1,2 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_working_days_export,access_working_days_export,model_working_days_export,base.group_user,1,1,1,1 +deltatech_work_days_report.access_working_days_export,access_working_days_export,deltatech_work_days_report.model_working_days_export,base.group_user,1,1,1,1 diff --git a/deltatech_work_days_report/static/description/index.html b/deltatech_work_days_report/static/description/index.html index 3b2d120abb..bf94165e9f 100644 --- a/deltatech_work_days_report/static/description/index.html +++ b/deltatech_work_days_report/static/description/index.html @@ -367,9 +367,20 @@

Work Days Report

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:142a4e37640663f59f9e7d67587c410b09388e09df0294e86ff5993560ab339c +!! source digest: sha256:8e724a4f70b41fc67f801cfabfeea93e245d52bfd5d0db7370b95717f3231fee !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: OPL-1 dhongu/deltatech

+
+
This module:
+
    +
  • adds the field “code” in the Time Off Type form
  • +
  • in the employee menu in list view you can select employees then press “Action” -> “Export Working Days” to +make an Excel file that contains the employees with their hours worked per day number of hours worked in total +, the number of meal vouchers earn by the employee and see the days they were on time off
  • +
  • if the code field in Time Off Type form is empty the cell will have “ABS” instead of the type of time off code
  • +
+
+

Table of contents