Skip to content

Commit

Permalink
Merge PR #31 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by remytms
  • Loading branch information
github-grap-bot committed Jun 6, 2024
2 parents 91d54d2 + 2be7e62 commit df7b7f0
Show file tree
Hide file tree
Showing 28 changed files with 1,998 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.20
_src_path: https://github.com/OCA/oca-addons-repo-template.git
_commit: v2.2.1
_src_path: https://github.com/coopiteasy/oca-addons-repo-template.git
ci: GitHub
convert_readme_fragments_to_markdown: false
generate_requirements_txt: true
Expand Down
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Description



## Odoo task (if applicable)



## Checklist before approval

- [ ] Tests are present (or not needed).
- [ ] Credits/copyright have been changed correctly.
- [ ] Change log snippet is present.
- [ ] (If a new module) Moving this to OCA has been considered.
17 changes: 0 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,6 @@ on:
- "16.0-ocabot-*"

jobs:
unreleased-deps:
runs-on: ubuntu-latest
name: Detect unreleased dependencies
steps:
- uses: actions/checkout@v3
- run: |
for reqfile in requirements.txt test-requirements.txt ; do
if [ -f ${reqfile} ] ; then
result=0
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
grep "^[^#].*/" ${reqfile} || result=$?
if [ $result -eq 0 ] ; then
echo "Unreleased dependencies found in ${reqfile}."
exit 1
fi
fi
done
test:
runs-on: ubuntu-22.04
container: ${{ matrix.container }}
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

0 comments on commit df7b7f0

Please sign in to comment.