Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16.0 mig hr timesheet overtime #31

Merged
merged 97 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
01b00af
[UPD] Update hr_timesheet_sheet_current.pot
Dec 19, 2023
2d958b1
[BOT] post-merge updates
github-grap-bot Dec 19, 2023
5e31f3c
[ADD] hr_timesheet_project_prevent_creation
carmenbianca Aug 23, 2022
7291a48
[UPD] Update hr_timesheet_project_prevent_creation.pot
Aug 26, 2022
24ff2b0
[UPD] README.rst
github-grap-bot Aug 26, 2022
a439104
[IMP] hr_timesheet_project_prevent_creation: black, isort, prettier
victor-champonnois Jul 27, 2023
cca63db
[MIG] hr_timesheet_project_prevent_creation: Migration to 13.0
victor-champonnois Jul 27, 2023
5c85277
[MIG] hr_timesheet_project_prevent_creation: Migration to 14.0
victor-champonnois Jul 27, 2023
8044736
[MIG] hr_timesheet_project_prevent_creation: Migration to 15.0
victor-champonnois Jul 27, 2023
5d7ccd5
[MIG] hr_timesheet_project_prevent_creation: Migration to 16.0
victor-champonnois Jul 27, 2023
a824e7f
[UPD] Update hr_timesheet_project_prevent_creation.pot
Jan 12, 2024
b8596f2
[BOT] post-merge updates
github-grap-bot Jan 12, 2024
c66e23a
[WIP] hr_timesheet_overtime
vvrossem Nov 27, 2019
91a0881
[WIP] hr_timesheet_overtime
vvrossem Nov 29, 2019
b84ca62
[FIX] hr_timesheet_overtime / expected singleton
vvrossem Dec 4, 2019
d7d0492
[ADD] hr_timesheet_overtime : compute datetime
vvrossem Dec 9, 2019
79a07a4
[REM] hr_timesheet_overtime : unused test
vvrossem Dec 10, 2019
4751964
[FIX] hr_timesheet_overtime : timesheet_overtime initial amount
vvrossem Dec 11, 2019
611facd
[IMP] hr_timesheet_overtime : limit view to group_hr_user
vvrossem Dec 11, 2019
1981f6a
[ADD] hr_timesheet_overtime : timesheet_overtime in list/tree view
vvrossem Dec 11, 2019
b683432
[REF] hr_timesheet_overtime : minor changes
vvrossem Dec 20, 2019
518ff39
[FIX] hr_timesheet_overtime : correct use of @api.depends
vvrossem Dec 23, 2019
1e2a435
[ADD] hr_timesheet_overtime: unit tests
vvrossem Dec 23, 2019
388bba5
[IMP] hr_timesheet_overtime: black formatter
vvrossem Dec 23, 2019
231171e
[FIX] hr_timesheet_overtime: @api.depends
vvrossem Dec 23, 2019
34f0052
[ADD] hr_timesheet_overtime: readonly total_overtime
vvrossem Dec 23, 2019
cf395a6
[FIX] hr_timesheet_overtime: timesheet_overtime computation
robinkeunen Jan 22, 2020
3126cf1
[FIX] hr_timesheet_overtime: total overtime is computed over employee
robinkeunen Jan 22, 2020
31032d5
[IMP] hr_timesheet_overtime: oca conventions
robinkeunen Jan 22, 2020
a4bb901
[REF] hr_timesheet_overtime: flake 8
robinkeunen Feb 5, 2020
34ecdad
[CHG] hr_timesheet_overtime: compute overtime according to current day
vvrossem Feb 19, 2020
4f0fc78
[WIP] hr_timesheet_overtime: don't compute expired contract
vvrossem Mar 3, 2020
5d9bfcd
[IMP] hr_timesheet_overtime: contract's date_start and date_end
vvrossem Mar 4, 2020
f131037
[ADD] hr_timesheet_overtime: overtime rate management
vvrossem Mar 4, 2020
25d0a49
[REM] hr_timesheet_overtime: unused utility method
vvrossem Mar 4, 2020
208e289
[ADD] hr_timesheet_overtime: security for resource_overtime[_rate]
vvrossem Mar 5, 2020
c6730ad
[FIX] hr_timesheet_overtime: AttributeError - 'NoneType' on date
vvrossem Mar 5, 2020
7061958
[FIX] hr_timesheet_overtime: overtime page in employee's form
vvrossem Mar 5, 2020
0b868a5
[REF] hr_timesheet_overtime: reading condition chronologically
vvrossem Mar 5, 2020
0a2b39c
[REF] hr_timesheet_overtime: append _day to total_timesheet
vvrossem Mar 5, 2020
c048fc2
[REF] hr_timesheet_overtime: get_worked_hours method
vvrossem Mar 5, 2020
65da806
[REF] hr_timesheet_overtime: pythonesque condition values.get("")
vvrossem Mar 5, 2020
5e657fc
[IMP] hr_timesheet_overtime: named paramaters for rate_ids
vvrossem Mar 5, 2020
b3c7837
[ADD] hr_timesheet_overtime: group_user rights
vvrossem Mar 9, 2020
d67ea9a
[FIX] hr_timesheet_overtime: group_system -> group_hr_manager
vvrossem Mar 9, 2020
e3483d5
[ADD] hr_timesheet_overtime : Overtime Rate menu in Timesheets
vvrossem Mar 9, 2020
3334822
[FIX] hr_timesheet_overtime: external id -proper data files order
vvrossem Mar 10, 2020
4d501bd
[FIX] hr_timesheet_overtime: overtime_start_date <= sheet.date_to
vvrossem Mar 12, 2020
08b1a43
[IMP] hr_timesheet_overtime: case with_context(create=True)
vvrossem Mar 16, 2020
6149d36
[ADD] hr_timesheet_overtime: access rights on page overtime
vvrossem Mar 31, 2020
b86bb70
[REM] hr_timesheet_overtime: remove total_overtime from timesheet she…
mclaeysb Nov 4, 2020
cbb2677
[ADD] hr_timesheet_overtime: archive timesheets
mclaeysb Nov 5, 2020
bd850bc
[REM] hr_timesheet_overtime: remove total_overtime from employee tree…
mclaeysb Nov 24, 2020
a9c11d8
[IMP] paint it black
huguesdk Sep 6, 2021
0f7e7e9
[MIG] hr_timesheet_overtime: migration to 10.0
huguesdk Oct 15, 2021
327996f
[MIG] hr_timesheet_overtime: migration to 11.0
huguesdk Oct 15, 2021
0c2c556
[MIG] hr_timesheet_overtime: migration to 12.0
huguesdk Oct 15, 2021
6af5686
[FIX] fix dependency to hr_timesheet.sheet.active
huguesdk Oct 15, 2021
3dc03d4
[IMP] update manifest and readme
huguesdk Oct 20, 2021
e3fcaaf
[IMP] pass pre-commit
huguesdk Oct 20, 2021
f11b117
[REF] depend on resource_work_time_from_contracts
huguesdk Oct 20, 2021
ae4bac2
[IMP] use list_normal_work_time_per_day()
huguesdk Nov 17, 2021
0b77b86
[FIX] extend overtime access to all superiors
victor-champonnois Feb 11, 2022
f824f59
[IMP] Prevent non-HR from modifying overtime
victor-champonnois Feb 11, 2022
08339c6
[REF] set has_overtime_access as private variable
victor-champonnois Feb 15, 2022
42a49bf
[REL] hr_timesheet_overtime 12.0.1.1.0
huguesdk Mar 20, 2022
2c4db6f
[IMP] use standard access rights
huguesdk May 11, 2022
e539522
[IMP] allow overtime sub-menuitems
huguesdk May 13, 2022
f3c5ddf
[FIX] Run pre-commit
carmenbianca May 16, 2022
ea965c9
[UPD] Update hr_timesheet_overtime.pot
May 16, 2022
cdcae71
[FIX] give access to employees' own total overtime
huguesdk May 20, 2022
b50ccea
[FIX] fix pre-commit errors
huguesdk May 20, 2022
ced94fb
[FIX] remove access rights on overtime fields
huguesdk May 20, 2022
02b34fd
[UPD] Update hr_timesheet_overtime.pot
May 26, 2022
d2b11e5
hr_timesheet_overtime 12.0.1.1.1
github-grap-bot May 26, 2022
3bc78ae
[REF] hr_timesheet_overtime: *_hours → *_time
carmenbianca May 18, 2022
839970b
[REF] hr_timesheet_overtime: Add working_time to sheet model
carmenbianca May 16, 2022
d77e678
[REF] hr_timesheet_overtime: Rename timesheet_overtime to timesheet_o…
carmenbianca May 16, 2022
943fb3a
[ADD] hr_timesheet_overtime: timesheet_overtime field
carmenbianca May 16, 2022
db0bb05
[ADD] hr_timesheet_overtime: Add working_time and timesheet_overtime …
carmenbianca May 18, 2022
5f34f38
[ADD] hr_timesheet_overtime: colour daily_overtime and total_overtime…
carmenbianca May 19, 2022
80e19e5
[ADD] hr_timesheet_overtime: Credit pro velo
carmenbianca Jun 3, 2022
75b94e9
[FIX] hr_timesheet_overtime: Use blue instead of green
carmenbianca Jun 15, 2022
d4ef334
[FIX] hr_timesheet_overtime: Use SavepointCase
carmenbianca Jun 3, 2022
7f619e9
hr_timesheet_overtime: Store computed values working_time and timeshe…
carmenbianca May 25, 2022
3df1ae3
[FIX] SCRLfs → SC
carmenbianca Jun 29, 2022
5f18277
[UPD] Update hr_timesheet_overtime.pot
Jul 20, 2022
5d8b83e
[UPD] README.rst
github-grap-bot Jul 20, 2022
498bc16
hr_timesheet_overtime 12.0.2.0.0
github-grap-bot Jul 20, 2022
65a2ed4
[IMP] hr_timesheet_overtime: black, isort, prettier
robinkeunen Jan 26, 2024
1f8a253
[MIG] hr_timesheet_overtime: migration to 13.0
robinkeunen Jan 26, 2024
7bf9baa
[MIG] hr_timesheet_overtime: migration to 16.0
robinkeunen Jan 26, 2024
ef78a5a
[MIG] hr_timesheet_overtime: remove type_id from demo data
robinkeunen Jan 26, 2024
4894c4d
[MIG] hr_timesheet_overtime: remove active button
robinkeunen Jan 26, 2024
1ddbf9a
[IMP] hr_timesheet_overtime: move timesheet sheets below timesheet pe…
robinkeunen Jan 26, 2024
3afa2f7
[ADD] hr_timesheet_overtime: test-requirements.txt
robinkeunen Feb 15, 2024
2be7e62
[FIX] Update copier template
carmenbianca Feb 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Available addons
addon | version | maintainers | summary
--- | --- | --- | ---
[hr_timesheet_auto_creation](hr_timesheet_auto_creation/) | 16.0.1.0.1 | | Create weekly timesheets for employees automatically
[hr_timesheet_project_prevent_creation](hr_timesheet_project_prevent_creation/) | 16.0.1.0.0 | [![carmenbianca](https://github.com/carmenbianca.png?size=30px)](https://github.com/carmenbianca) | Prevent creation of projects and tasks from timesheets.
[hr_timesheet_sheet_current](hr_timesheet_sheet_current/) | 16.0.1.0.0 | | Allow to access the current timesheet sheet directly from the menu
remytms marked this conversation as resolved.
Show resolved Hide resolved

[//]: # (end addons)

Expand Down
71 changes: 71 additions & 0 deletions hr_timesheet_overtime/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
=============================
Timesheet/Contract - Overtime
=============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:864f762c46f2380ae49c8c705bd419243ee57a30b935ef491a26df7837f119d4
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-coopiteasy%2Fcie--timesheet-lightgray.png?logo=github
:target: https://github.com/coopiteasy/cie-timesheet/tree/16.0/hr_timesheet_overtime
:alt: coopiteasy/cie-timesheet

|badge1| |badge2| |badge3|

Computes overtime hours according to employee's contracts.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/cie-timesheet/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/coopiteasy/cie-timesheet/issues/new?body=module:%20hr_timesheet_overtime%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Coop IT Easy SC

Contributors
~~~~~~~~~~~~

* `Coop IT Easy SC <https://coopiteasy.be>`_:

* Vincent Van Rossem
* Robin Keunen
* Manuel Claeys Bouuaert
* hugues de keyzer

Other credits
~~~~~~~~~~~~~

The development of this module has been paid for by
`Pro Velo <https://www.provelo.org/>`_.

Maintainers
~~~~~~~~~~~

This module is part of the `coopiteasy/cie-timesheet <https://github.com/coopiteasy/cie-timesheet/tree/16.0/hr_timesheet_overtime>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions hr_timesheet_overtime/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
26 changes: 26 additions & 0 deletions hr_timesheet_overtime/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2020 Coop IT Easy SC
# - Vincent Van Rossem <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Timesheet/Contract - Overtime",
"version": "16.0.2.0.0",
"category": "Human Resources",
"summary": "Overtime Calculation",
"author": "Coop IT Easy SC, Odoo Community Association (OCA)",
"website": "https://github.com/coopiteasy/cie-timesheet",
"license": "AGPL-3",
"depends": [
"company_today",
"hr_timesheet_sheet",
"resource_work_time_from_contracts",
],
"data": [
"security/ir.model.access.csv",
"views/hr_employee_view.xml",
"views/resource_view.xml",
"views/hr_timesheet_sheet_view.xml",
],
"demo": [
"demo/hr_contract_demo.xml",
],
}
123 changes: 123 additions & 0 deletions hr_timesheet_overtime/demo/hr_contract_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2020 Coop IT Easy
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">

<!-- Part time-->
<record id="resource_calendar_part_time1" model="resource.calendar">
<field name="name">4/5</field>
</record>

<record id="resource_calendar_part_time2" model="resource.calendar">
<field name="name">1/5</field>
</record>

<!-- Working Hours 4/5 -->
<record model="resource.calendar.attendance" id="calendar_attendance_pt_mon1">
<field name="name">Monday morning</field>
<field name="dayofweek">0</field>
<field name="hour_from">09</field>
<field name="hour_to">13</field>
<field name="calendar_id" ref="resource_calendar_part_time1" />
</record>

<record model="resource.calendar.attendance" id="calendar_attendance_mon2">
<field name="name">Monday afternoon</field>
<field name="dayofweek">0</field>
<field name="hour_from">14</field>
<field name="hour_to">18</field>
<field name="calendar_id" ref="resource_calendar_part_time1" />
</record>

<record model="resource.calendar.attendance" id="calendar_attendance_pt_tue1">
<field name="name">Tuesday morning</field>
<field name="dayofweek">1</field>
<field name="hour_from">09</field>
<field name="hour_to">13</field>
<field name="calendar_id" ref="resource_calendar_part_time1" />
</record>

<record model="resource.calendar.attendance" id="calendar_attendance_tue2">
<field name="name">Tuesday afternoon</field>
<field name="dayofweek">1</field>
<field name="hour_from">14</field>
<field name="hour_to">18</field>
<field name="calendar_id" ref="resource_calendar_part_time1" />
</record>

<record model="resource.calendar.attendance" id="calendar_attendance_pt_wed1">
<field name="name">Wednesday morning</field>
<field name="dayofweek">2</field>
<field name="hour_from">09</field>
<field name="hour_to">13</field>
<field name="calendar_id" ref="resource_calendar_part_time1" />
</record>

<record model="resource.calendar.attendance" id="calendar_attendance_wed2">
<field name="name">Wednesday afternoon</field>
<field name="dayofweek">2</field>
<field name="hour_from">14</field>
<field name="hour_to">18</field>
<field name="calendar_id" ref="resource_calendar_part_time1" />
</record>

<record model="resource.calendar.attendance" id="calendar_attendance_pt_thu1">
<field name="name">Thursday morning</field>
<field name="dayofweek">3</field>
<field name="hour_from">09</field>
<field name="hour_to">13</field>
<field name="calendar_id" ref="resource_calendar_part_time1" />
</record>

<record model="resource.calendar.attendance" id="calendar_attendance_thu2">
<field name="name">Thursday afternoon</field>
<field name="dayofweek">3</field>
<field name="hour_from">14</field>
<field name="hour_to">18</field>
<field name="calendar_id" ref="resource_calendar_part_time1" />
</record>

<!-- Working Hours 1/5 -->
<record model="resource.calendar.attendance" id="calendar_attendance_pt_fri1">
<field name="name">Friday morning</field>
<field name="dayofweek">4</field>
<field name="hour_from">09</field>
<field name="hour_to">13</field>
<field name="calendar_id" ref="resource_calendar_part_time2" />
</record>

<record model="resource.calendar.attendance" id="calendar_attendance_fri2">
<field name="name">Friday afternoon</field>
<field name="dayofweek">4</field>
<field name="hour_from">14</field>
<field name="hour_to">18</field>
<field name="calendar_id" ref="resource_calendar_part_time2" />
</record>

<!-- Employee's Contracts -->

<record id="mitchell_admin_contract1" model="hr.contract">
<field name="name">Mitchell Admin Contract #1</field>
<field name="employee_id" ref="hr.employee_admin" />
<field name="job_id" ref="hr.job_ceo" />
<field name="department_id" ref="hr.dep_management" />
<field name="resource_calendar_id" ref="resource_calendar_part_time1" />
<field name="wage" eval="0.0" />
<field name="date_start" eval="datetime.now().date().replace(month=1, day=1)" />
<field name="date_end" eval="datetime.now().date().replace(month=12, day=31)" />
</record>

<record id="mitchell_admin_contract2" model="hr.contract">
<field name="name">Mitchell Admin Contract #2</field>
<field name="employee_id" ref="hr.employee_admin" />
<field name="job_id" ref="hr.job_ceo" />
<field name="department_id" ref="hr.dep_management" />
<field name="resource_calendar_id" ref="resource_calendar_part_time2" />
<field name="wage" eval="0.0" />
<field name="date_start" eval="time.strftime('%Y')+'-01-01'" />
<field name="date_end" eval="time.strftime('%Y')+'-12-31'" />
</record>

</odoo>
Loading
Loading