18.0-migrate-hr_holidays_timeoff_analysis-coming-from-repo-elabore-addons #12

Open
mondot wants to merge 3 commits from 18.0-migrate-hr_holidays_timeoff_analysis-coming-from-repo-elabore-addons into 18.0
Owner
No description provided.
mondot added 3 commits 2025-10-09 12:46:39 +00:00
mondot added 2 commits 2025-10-10 09:28:46 +00:00
[IMP] hr_holidays_timeoff_analysis : migrate from version 16 to 18
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m27s
d3c47266b6
[IMP] hr_holidays_timeoff_analysis : migrate from version 16 to 18
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m25s
8c8b617e8c
mondot added 2 commits 2025-10-10 09:35:46 +00:00
[IMP] hr_holidays_timeoff_analysis : migrate from version 16 to 18
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m25s
8c8b617e8c
[IMP] hr_holidays_timeoff_analysis : migrate from version 16 to 18
All checks were successful
pre-commit / pre-commit (pull_request) Successful in 1m25s
d24477bed9
mondot added 2 commits 2025-10-10 10:18:52 +00:00
[IMP] hr_holidays_timeoff_analysis : migrate from version 16 to 18
All checks were successful
pre-commit / pre-commit (pull_request) Successful in 1m25s
d24477bed9
[IMP] hr_holidays_timeoff_analysis : migrate from version 16 to 18
All checks were successful
pre-commit / pre-commit (pull_request) Successful in 1m26s
bc64030847
Author
Owner

Cc @laetitiadacosta

j'ai maj les tests pour qu'ils passent. Par contre il y en a un qui fail avec cette erreur

2025-10-10 10:18:12,299 134 ERROR odoo_test_hr_holidays odoo.addons.hr_holidays_timeoff_analysis.tests.test_hr_leave_timeoff_day: ERROR: TestHrLeaveTimeoffDay.test_leave_duration_by_day_hour_compare_to_employee_calendar
Traceback (most recent call last):
  File "/opt/odoo/auto/dev/hr-tools/hr_holidays_timeoff_analysis/tests/test_hr_leave_timeoff_day.py", line 229, in test_leave_duration_by_day_hour_compare_to_employee_calendar
    leave._compute_number_of_hours_display()
AttributeError: 'hr.leave' object has no attribute '_compute_number_of_hours_display'

Et effectivement dans la version 18, la fonction _compute_number_of_hours_display n'existe plus pour le modèle hr.leave.

Il va falloir que tu vois comment modifier la fonction

    def compute_leave_duration_by_day(self, leave):
        """
        Compute the leave duration by day based on the leave type.
        """
        [...]
        elif leave.request_unit_hours:
            leave_duration_by_day = leave.number_of_days_display
        [...]

pour l'adapter en v18

Cc @laetitiadacosta j'ai maj les tests pour qu'ils passent. Par contre il y en a un qui fail avec cette erreur ``` 2025-10-10 10:18:12,299 134 ERROR odoo_test_hr_holidays odoo.addons.hr_holidays_timeoff_analysis.tests.test_hr_leave_timeoff_day: ERROR: TestHrLeaveTimeoffDay.test_leave_duration_by_day_hour_compare_to_employee_calendar Traceback (most recent call last): File "/opt/odoo/auto/dev/hr-tools/hr_holidays_timeoff_analysis/tests/test_hr_leave_timeoff_day.py", line 229, in test_leave_duration_by_day_hour_compare_to_employee_calendar leave._compute_number_of_hours_display() AttributeError: 'hr.leave' object has no attribute '_compute_number_of_hours_display' ``` Et effectivement dans la version 18, la fonction _compute_number_of_hours_display n'existe plus pour le modèle `hr.leave`. Il va falloir que tu vois comment modifier la fonction ``` def compute_leave_duration_by_day(self, leave): """ Compute the leave duration by day based on the leave type. """ [...] elif leave.request_unit_hours: leave_duration_by_day = leave.number_of_days_display [...] ``` pour l'adapter en v18
laetitiadacosta approved these changes 2025-10-13 08:43:57 +00:00
mondot requested review from laetitiadacosta 2025-10-15 08:26:20 +00:00
All checks were successful
pre-commit / pre-commit (pull_request) Successful in 1m26s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 18.0-migrate-hr_holidays_timeoff_analysis-coming-from-repo-elabore-addons:18.0-migrate-hr_holidays_timeoff_analysis-coming-from-repo-elabore-addons
git checkout 18.0-migrate-hr_holidays_timeoff_analysis-coming-from-repo-elabore-addons
Sign in to join this conversation.
No description provided.