Skip to content

[18.0][MIG] hr_leave_custom_hour_interval: Migration to 18.0#182

Open
BhaveshHeliconia wants to merge 11 commits intoOCA:18.0from
HeliconiaIO:18.0-mig-hr_leave_custom_hour_interval
Open

[18.0][MIG] hr_leave_custom_hour_interval: Migration to 18.0#182
BhaveshHeliconia wants to merge 11 commits intoOCA:18.0from
HeliconiaIO:18.0-mig-hr_leave_custom_hour_interval

Conversation

@BhaveshHeliconia
Copy link
Copy Markdown
Contributor

No description provided.

@Kimkhoi3010
Copy link
Copy Markdown

Kimkhoi3010 commented May 29, 2025

Hi @BhaveshHeliconia, I encountered this error when trying to create a new leave on the UI:

  File "/odoo/src/addons/hr_holidays/models/hr_leave.py", line 701, in onchange
    return super().onchange(values, field_names, fields_spec)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/odoo/src/addons/web/models/models.py", line 1002, in onchange
    record._apply_onchange_methods(field_name, result)
  File "/odoo/src/odoo/models.py", line 7312, in _apply_onchange_methods
    res = method(self)
          ^^^^^^^^^^^^
  File "/odoo/src/addons/hr_holidays/models/hr_leave.py", line 237, in _onchange_hours
    self.request_hour_from = min(self.request_hour_from, 23.99)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'float' and 'str'

Can you check again?


request_time_hour_from = fields.Float("Float hour from")

request_hour_from = fields.Char(compute="_compute_hour_from", store=True)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The fields request_hour_from and request_hour_to have been changed from Selection to Float — you can take a look at this commit

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_leave_custom_hour_interval branch from beeb3b3 to b8ec3ce Compare May 30, 2025 05:03
@BhaveshHeliconia
Copy link
Copy Markdown
Contributor Author

@Kimkhoi3010 : Please review again. Thanks.

@Kimkhoi3010
Copy link
Copy Markdown

@Kimkhoi3010 : Please review again. Thanks.

Can you check again? It doesn't work with me
image

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_leave_custom_hour_interval branch from b8ec3ce to 63e7c84 Compare June 3, 2025 10:25
@BhaveshHeliconia
Copy link
Copy Markdown
Contributor Author

@Kimkhoi3010 : Please review again. Thanks.

<field name="model">hr.leave</field>
<field name="inherit_id" ref="hr_holidays.hr_leave_view_form" />
<field name="arch" type="xml">
<field name="request_hour_from" position="attributes">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you check the view again?
It's still not working with me.
image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Kimkhoi3010 See its working.
Screenshot from 2025-06-04 09-47-54

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_leave_custom_hour_interval branch from 63e7c84 to d2b3423 Compare July 25, 2025 06:33
@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 23, 2025
@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_leave_custom_hour_interval branch from d2b3423 to 5c3bc35 Compare November 25, 2025 05:39
@BhaveshHeliconia
Copy link
Copy Markdown
Contributor Author

Hey @OCA/human-resources-maintainers would be great if someone could have a look at this module.

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 30, 2025
@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_leave_custom_hour_interval branch from 5c3bc35 to aba982a Compare March 13, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants