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

[12.0] Store computed values working_time and timesheet_overtime #20

Merged
merged 3 commits into from
Jul 20, 2022

Conversation

carmenbianca
Copy link
Member

@carmenbianca carmenbianca commented Jun 3, 2022

Description

Change overtime into stored fields.

Depends on coopiteasy/addons#243

Builds on top of #16

Odoo task (if applicable)

https://gestion.coopiteasy.be/web#id=4362&action=475&active_id=198&model=project.task&view_type=form&menu_id=536

Checklist before approval

  • Tests are present (or not needed).
  • Credits/copyright have been changed correctly.
  • (If a new module) Moving this to OCA has been considered.

@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2022

Codecov Report

Merging #20 (2acfb20) into 12.0-provelo-custom (8f9e071) will decrease coverage by 38.04%.
The diff coverage is 7.69%.

@@                   Coverage Diff                    @@
##           12.0-provelo-custom      #20       +/-   ##
========================================================
- Coverage                91.87%   53.82%   -38.05%     
========================================================
  Files                       22       22               
  Lines                      357      431       +74     
  Branches                    45       52        +7     
========================================================
- Hits                       328      232       -96     
- Misses                      23      193      +170     
  Partials                     6        6               
Impacted Files Coverage Δ
hr_timesheet_overtime/tests/test_overtime.py 1.35% <1.63%> (-98.65%) ⬇️
hr_timesheet_overtime/models/hr_employee.py 62.26% <100.00%> (-21.07%) ⬇️
hr_timesheet_overtime/models/hr_timesheet_sheet.py 64.00% <100.00%> (-16.86%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@carmenbianca carmenbianca changed the title 12.0 store fields overtime [12.0] Store computed values working_time and timesheet_overtime Jun 3, 2022
Copy link
Member

@huguesdk huguesdk left a comment

Choose a reason for hiding this comment

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

lgtm. 🎉 great job! thanks carmen!

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
…et_overtime

This is technically not very useful; these values will be recomputed
every time a new thing is timesheeted. However, it allows you to
aggregate all working hours and overtime hours when using 'group by' in
the timesheet tree view.

This change is extensively tested.

Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
@carmenbianca carmenbianca merged commit 86f1f07 into 12.0-provelo-custom Jul 20, 2022
@carmenbianca carmenbianca deleted the 12.0-store-fields-overtime branch July 20, 2022 13:28
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.

4 participants