-
Notifications
You must be signed in to change notification settings - Fork 17
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] resource_work_time_from_contracts #302
[16.0] [MIG] resource_work_time_from_contracts #302
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments.
Will also look at the failing test.
def get_work_days_data( | ||
def _get_work_days_data_batch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the commit message, which indirectly links to odoo/odoo#56477, I think this change (and all other changes in the commit 7bbb859) should be squashed into the 13.0 migration commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Patched up the failing test. Please remove the reverted commit (and the revert commit) before merging. I kept them for history's sake. |
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## 16.0 #302 +/- ##
==========================================
- Coverage 97.73% 97.59% -0.15%
==========================================
Files 12 21 +9
Lines 221 457 +236
Branches 30 51 +21
==========================================
+ Hits 216 446 +230
- Misses 1 4 +3
- Partials 4 7 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
c4937d6
to
adea1ca
Compare
thanks a lot carmen ! |
/ocabot rebase |
* override resource.mixin.get_work_days_data() to also take contracts into account. this is used for example by the hr_holidays module to compute leave days. * force employees' working hours to be equal to the company's working hours. * hide the working hours field on the employee form view.
hide working time column from resource list view.
* fix work time computation with existing leaves. * add .list_normal_work_time_per_day() method to compute work time ignoring leaves. * fix timezone issues.
force leaves to use the resource calendar of the company. to compute working hours while taking leaves into account, this module requires that all leaves for all resources are defined in the same resource calendar.
Signed-off-by: Carmen Bianca Bakker <[email protected]>
Signed-off-by: Carmen Bianca Bakker <[email protected]>
[FIX] rename get_work_days_data to _get_work_days_data_batch following this commit OCA/OCB@8c96a88
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Congratulations, PR rebased to 16.0. |
adea1ca
to
4503e9f
Compare
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 5abf60e. Thanks a lot for contributing to coopiteasy. ❤️ |
@robinkeunen The merge process could not be finalized because an exception was raised: 500 [No message]. |
@huguesdk I have one failing test and I can't make it work. Also I am not sure about commit eca1800.
Could you help ?
The error happens for
test_with_leaves
When I stop at line
addons/resource_work_time_from_contracts/models/resource_mixin.py
Line 143 in eca1800
self.list_leaves(from_datetime,to_datetime)
Alors qu'en 12 j'obtiens :