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

[17.0][FIX] hr_leave_custom_hour_interval: fix compute_hour functions #165

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hr_leave_custom_hour_interval/models/hr_leave.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
@api.depends("request_time_hour_from")
def _compute_hour_from(self):
for leave in self:
leave.request_hour_from = "%.2f" % self.request_time_hour_from
leave.request_hour_from = "%.2f" % leave.request_time_hour_from

Check warning on line 21 in hr_leave_custom_hour_interval/models/hr_leave.py

View check run for this annotation

Codecov / codecov/patch

hr_leave_custom_hour_interval/models/hr_leave.py#L21

Added line #L21 was not covered by tests

@api.depends("request_time_hour_to")
def _compute_hour_to(self):
for leave in self:
leave.request_hour_to = "%.2f" % self.request_time_hour_to
leave.request_hour_to = "%.2f" % leave.request_time_hour_to

Check warning on line 26 in hr_leave_custom_hour_interval/models/hr_leave.py

View check run for this annotation

Codecov / codecov/patch

hr_leave_custom_hour_interval/models/hr_leave.py#L26

Added line #L26 was not covered by tests

@api.depends("request_time_hour_from", "request_time_hour_to")
def _compute_date_from_to(self):
Expand Down