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

13.0 mig hr attendance report theoretical time #1

Conversation

pegonzalezspesol
Copy link
Contributor

@pegonzalezspesol pegonzalezspesol commented Dec 10, 2019

Added oca_dependency.

pedrobaeza and others added 28 commits December 10, 2019 15:12
Theoretical vs Attended Time Analysis
=====================================

This module adds a new report called "Theoretical vs Attended Time Analysis"
that compares worked time, measured through attendances records, with the
theoretical time, computed from employee's working calendar, public holidays
and employee specific leaves.

There is the possibility of counting as theoretical time some leave types if
specified in them.

Installation
============

On installation time, this module computes the theoretical hours for the day of
the attendance check-in, so if you have a lot of records, this would be a bit
slow.

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

You need to be at least "Attendance / Manual Attendance" for being able to see
the attendances report.

For including some leave types in the theoretical time, you have to:

* Go to Leaves > Configuration.
* Select leave type you want to include.
* Check the mark "Include in theoretical hours".

Usage
=====

* Go to *Attendances > Reports > Theoretical vs Attended Time Analysis*.
* Check pivot table or look at the graph view.

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

* Employees with less than 1 week in the company will show full week
  theoretical hours.
* Activate ORM cache for improving performance on computing theoretical hours,
  but assuring that the cache is cleared when the conditions of the computation
  changes.
* If you change employee's working time, theoretical hours for non attended
  days will be computed according this new calendar. You have to define
  start and end dates inside the calendar for avoiding this side effect.
* Recompute theoretical hours of affected days when changing the leave type
  to be included or not in theoretical time.
Currently translated at 100.0% (26 of 26 strings)

Translation: hr-10.0/hr-10.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-10-0/hr-10-0-hr_attendance_report_theoretical_time/de/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
* Standard procedure
* Adapt data model
* Adapt views
* Adapt code for date handling
* Adapt tests
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-12.0/hr-12.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_attendance_report_theoretical_time/
Currently translated at 80.8% (21 of 26 strings)

Translation: hr-12.0/hr-12.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_attendance_report_theoretical_time/fr/
Currently translated at 80.8% (21 of 26 strings)

Translation: hr-12.0/hr-12.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_attendance_report_theoretical_time/fr/
Currently translated at 80.8% (21 of 26 strings)

Translation: hr-12.0/hr-12.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_attendance_report_theoretical_time/fr/
Currently translated at 100.0% (26 of 26 strings)

Translation: hr-12.0/hr-12.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_attendance_report_theoretical_time/de/
Currently translated at 100.0% (26 of 26 strings)

Translation: hr-12.0/hr-12.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_attendance_report_theoretical_time/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-12.0/hr-12.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_attendance_report_theoretical_time/
Currently translated at 97.6% (41 of 42 strings)

Translation: hr-12.0/hr-12.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_attendance_report_theoretical_time/de/
- We add a wizard so the already existing attendances can be recomputed
according to an employee calendar change, like a different for a set of
dates that weren't took into consideration in advance, so the wrong
theoretical hours are computed.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-12.0/hr-12.0-hr_attendance_report_theoretical_time
Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_attendance_report_theoretical_time/
- Although the minor permission to access the theoretical time report is
"Manual Attendance", the menu wasn't accessible due to permissions.
- Record rules also prevent such users from seeing other employees
attendances.
@pegonzalezspesol pegonzalezspesol force-pushed the 13.0-mig-hr_attendance_report_theoretical_time branch from 7cf2f5c to f665308 Compare December 10, 2019 15:09
@pedrobaeza pedrobaeza added this to the 13.0 milestone Dec 10, 2019
@rafaelbn
Copy link
Member

Hello @pegonzalezspesol ! :-)

We are in a hurry with this migration. Please if you cannot attend it told us in order to continue it!

Thank you!

@pegonzalezspesol
Copy link
Contributor Author

Hello @pegonzalezspesol ! :-)

We are in a hurry with this migration. Please if you cannot attend it told us in order to continue it!

Thank you!

Hi @rafaelbn I currently can attend it. Otherwise I will let you know.

@pegonzalezspesol pegonzalezspesol force-pushed the 13.0-mig-hr_attendance_report_theoretical_time branch 2 times, most recently from 3cc9d99 to bfcbf99 Compare December 30, 2019 07:41
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, although runbot isn't available for tests, so I couldn't make a functional one 😕

@pegonzalezspesol pegonzalezspesol force-pushed the 13.0-mig-hr_attendance_report_theoretical_time branch from bfcbf99 to 098aed8 Compare January 1, 2020 08:55
Copy link
Member

@ernestotejeda ernestotejeda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chienandalu
Copy link
Member

I'd like to do a little a functional test before approving. @pedrobaeza how's runbot troubleshooting status right now?

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, great. I finally could test it 🙂 👍 Thanks for your work!

@pedrobaeza
Copy link
Member

/ocabot merge

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 13.0-ocabot-merge-pr-1-by-pedrobaeza-bump-no, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Jan 3, 2020
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot OCA-git-bot merged commit d62d243 into OCA:13.0 Jan 3, 2020
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 07eda22. Thanks a lot for contributing to OCA. ❤️

@pegonzalezspesol
Copy link
Contributor Author

Ok, great. I finally could test it Thanks for your work!

You are welcome @chienandalu . Thanks for your revision! Unfortunatelly I could not see what kind of noise is removed as many oca-bot automatic translations are still there, I will continue digging into.

Highcooley referenced this pull request in camptocamp/hr-attendance Jan 23, 2024
…dances (#1)

* [IMP] hr_attendance_missing_days: don't break on multi work day attendances

* [ADD] hr_attendance_contract_missing_days: tests

* fixup! [ADD] hr_attendance_contract_missing_days: tests
Highcooley referenced this pull request in camptocamp/hr-attendance Jan 23, 2024
…dances (#1)

* [IMP] hr_attendance_missing_days: don't break on multi work day attendances

* [ADD] hr_attendance_contract_missing_days: tests

* fixup! [ADD] hr_attendance_contract_missing_days: tests
OCA-git-bot pushed a commit that referenced this pull request Jun 3, 2024
…dances (#1)

* [IMP] hr_attendance_missing_days: don't break on multi work day attendances

* [ADD] hr_attendance_contract_missing_days: tests

* fixup! [ADD] hr_attendance_contract_missing_days: tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.