Metadata-Version: 2.1
Name: odoo14-addon-hr_attendance_overtime
Version: 14.0.1.0.2.dev2
Summary: Mark Attendances as overtime.
Home-page: https://github.com/OCA/hr-attendance
Author: Pierre Verkest, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
License: AGPL-3
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 14.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Requires-Python: >=3.6
Requires-Dist: odoo14-addon-hr-attendance-autoclose
Requires-Dist: odoo14-addon-hr-attendance-reason
Requires-Dist: odoo<14.1dev,>=14.0a

======================
Hr Attendance Overtime
======================

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

.. |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-OCA%2Fhr--attendance-lightgray.png?logo=github
    :target: https://github.com/OCA/hr-attendance/tree/14.0/hr_attendance_overtime
    :alt: OCA/hr-attendance
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/hr-attendance-14-0/hr-attendance-14-0-hr_attendance_overtime
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/hr-attendance&target_branch=14.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Mark Attendances as overtime according works week employee configuration
to track times done outside the theoretical work times.

At check-out time the attendance line can be split in order to help manager
with employee presence reviews and compute compensatory hours.

With this module:

* Employee can visualize plan open work times

  .. image:: https://raw.githubusercontent.com/OCA/hr-attendance/14.0/hr_attendance_overtime/static/img/my_attendance.png

  The check-in/check-out button has different colors according
  the current state, employee is early, on time, late.

* You can configure theoretical check-in/check-out hours ranges on employee works
  week.

* While employee check-out following rules are applied on the closed attendance line:

  * Checking rules are:

    * check-in before starting ranges will create two attendances:

      * The first one will be marked as overtime and stopped at the beginning of the
        starting range, an earlier reason will be add.
      * The second will start at the end of the first one.

    * check-in in the starting range will open attendance as normal
    * check-after the starting range will open attendances as normal adding
      a late reason

  * Check out rules

    * Check-out before check-out hours range will marked the attendance as leave earlier
    * Check-out in the given range will close the attendance as normal
    * Check-out after the range will generate 2 attendance

      * a normal one that terminate at the end of the range
      * an overtime one that start from the end of range to the check-out time
        a late reason is added as well

* Auto close rules: We suggest to plan an auto close ir.cron after each
  work time attendance basically one between the
  morning and afternoon and one at the end of the day.
  Previous check-out rules described above will be applied with the
  auto-close module reason using the ir cron execution time. If no
  theoretical work time found for open hr attendance a fallback to the
  auto-close module rules are applied.


This module is used by `hr_attendance_validation` in order to helps
manager review weeks hours and generate compensatoires hours per
employee.

**Table of contents**

.. contents::
   :local:

Configuration
=============

This modules depend on different configurations:

To setup ranges hours on employee work time weeks:

#. Go to *Settings > Technical > Resource > Working Times*
   or from employee form Go to *Employees > Employees > in employee form view > working hours*.
#. On the form view you can setup 4 new fields add by this module on each attendance lines

  * *check-in from*: Check-in before will result an extra overtime line with an earlier check-in reason (`CI-E`)
  * *check-in to*: Check-in after will add a late check-in reason (`CI-L`)
  * *check-out from*: Check-out before will add a earlier check-out reason (`CO-E`)
  * *check-out to*: Check-out after will generate an extra overtime line with a late check-out reason (`CO-L`)

We have chosen to not reuse existing *Work from* and *Work to* that are used by other modules like *hr_holidays*
with compensatoires leaves. To be able to define a bigger range that overlap that time.

You can personalize 4 kinds of reason label that are selected by code which must remains the same and uniq:

#. Go to *Attendances > configuration > Reason*
#. personalize name for following code:

  * `CI-E`: check-in earlier (checked-in occurred before *check-in from*)
  * `CI-L`: check-in late (checked-in occurred after *check-in to*)
  * `CO-E`: check-out earlier (checked-out occurred before *check-out from*)
  * `CO-L`: check-out late (checked-out occurred after *check-out to*)

Known issues / Roadmap
======================

* Display planning in kiosk mode as well
* Ensure it works with a two weeks calendar
* Considering global time off and hr_holidays
* Ensure there is no overlap between work time
  lines of the same work time calendar

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr-attendance/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/OCA/hr-attendance/issues/new?body=module:%20hr_attendance_overtime%0Aversion:%2014.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
~~~~~~~

* Pierre Verkest

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

* Pierre Verkest <pierreverkest84@gmail.com>

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

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-petrus-v| image:: https://github.com/petrus-v.png?size=40px
    :target: https://github.com/petrus-v
    :alt: petrus-v

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-petrus-v| 

This module is part of the `OCA/hr-attendance <https://github.com/OCA/hr-attendance/tree/14.0/hr_attendance_overtime>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
