coopiteasy / addons

Various modules that extend or improve Odoo Community.
GNU Affero General Public License v3.0
21 stars 17 forks source link

[16.0] [MIG] resource_work_time_from_contracts #302

Closed victor-champonnois closed 10 months ago

victor-champonnois commented 1 year ago

@huguesdk I have one failing test and I can't make it work. Also I am not sure about commit eca18007f3626068cace513d2160a0f06324e7f3. Could you help ?

The error happens for test_with_leaves

When I stop at line https://github.com/coopiteasy/addons/blob/eca18007f3626068cace513d2160a0f06324e7f3/resource_work_time_from_contracts/models/resource_mixin.py#L143 and do self.list_leaves(from_datetime,to_datetime)

0:
(datetime.date(2021, 10, 26), 1.8, resource.calendar.leaves(81,))
1:
(datetime.date(2021, 10, 26), 1.0, resource.calendar.leaves(81,))
2:
(datetime.date(2021, 10, 27), 1.8, resource.calendar.leaves(82,))
3:
(datetime.date(2021, 10, 29), 1.8, resource.calendar.leaves(83,))
4:
(datetime.date(2021, 10, 29), 3.8, resource.calendar.leaves(83,))

Alors qu'en 12 j'obtiens :

0:
(datetime.date(2021, 10, 26), 3.8, resource.calendar.leaves(10,))
1:
(datetime.date(2021, 10, 27), 3.8, resource.calendar.leaves(11,))
2:
(datetime.date(2021, 10, 29), 3.8, resource.calendar.leaves(12,))
3:
(datetime.date(2021, 10, 29), 3.8, resource.calendar.leaves(12,))

normal_work_time_per_day est OK.

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

carmenbianca commented 1 year ago

Patched up the failing test. Please remove the reverted commit (and the revert commit) before merging. I kept them for history's sake.

codecov-commenter commented 1 year ago

Codecov Report

Merging #302 (c4937d6) into 16.0 (b640076) will decrease coverage by 0.15%. The diff coverage is 97.45%.

:exclamation: 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     
Files Changed Coverage Δ
..._work_time_from_contracts/models/resource_mixin.py 92.77% <92.77%> (ø)
resource_work_time_from_contracts/__init__.py 100.00% <100.00%> (ø)
...source_work_time_from_contracts/models/__init__.py 100.00% <100.00%> (ø)
..._from_contracts/models/resource_calendar_leaves.py 100.00% <100.00%> (ø)
...rk_time_from_contracts/models/resource_resource.py 100.00% <100.00%> (ø)
...esource_work_time_from_contracts/tests/__init__.py 100.00% <100.00%> (ø)
...k_time_from_contracts/tests/test_work_days_data.py 100.00% <100.00%> (ø)
...e_work_time_from_contracts/tests/test_work_time.py 100.00% <100.00%> (ø)
...k_time_from_contracts/tests/test_work_time_base.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

victor-champonnois commented 1 year ago

thanks a lot carmen !

robinkeunen commented 10 months ago

/ocabot rebase

github-grap-bot commented 10 months ago

Congratulations, PR rebased to 16.0.

robinkeunen commented 10 months ago

/ocabot merge nobump

github-grap-bot commented 10 months ago

On my way to merge this fine PR! Prepared branch 16.0-ocabot-merge-pr-302-by-robinkeunen-bump-nobump, awaiting test results.

github-grap-bot commented 10 months ago

Congratulations, your PR was merged at 5abf60e8de6b3d13cf896f4bf7cd2c7606fc224c. Thanks a lot for contributing to coopiteasy. ❤️

github-grap-bot commented 10 months ago

@robinkeunen The merge process could not be finalized because an exception was raised: 500 [No message].