Skip to content

Commit

Permalink
[IMP] hr_holidays_remaining_leaves: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sonhd91 committed Jun 12, 2024
1 parent 9067114 commit ac28cc7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hr_holidays_remaining_leaves/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Show remaining leaves per employee in allocation overview.
""",
"author": "Mint System GmbH, Odoo Community Association (OCA)",
"website": "https://www.mint-system.ch",
"website": "https://github.com/OCA/hr-holidays",
"category": "Human Resources",
"version": "16.0.1.0.0",
"license": "AGPL-3",
Expand Down
3 changes: 0 additions & 3 deletions hr_holidays_remaining_leaves/models/hr_leave.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ def _get_number_of_days_and_hours(self, date_from, date_to, employee_id):
)[employee.id]

def _compute_remaining_leaves(self):

now = fields.Datetime.now()
now = datetime.combine(now, datetime.min.time())

for allocation in self:

# Get all validated leaves filtered by employee and leave type
leaves = self.env["hr.leave"].search(
[
Expand Down Expand Up @@ -89,7 +87,6 @@ def _compute_remaining_leaves(self):

def _compute_remaining_leaves_display(self):
for allocation in self:

allocation.remaining_leaves_display = "%g %s" % (
(
float_round(allocation.remaining_leaves_hours, precision_digits=2)
Expand Down
3 changes: 3 additions & 0 deletions hr_holidays_remaining_leaves/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

0 comments on commit ac28cc7

Please sign in to comment.