Skip to content

Commit

Permalink
[ssi_hr_overtime] Task #T/01/25/000028
Browse files Browse the repository at this point in the history
  • Loading branch information
mikevhe18 committed Jan 7, 2025
1 parent 4d16f18 commit 64fb265
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ssi_hr_overtime/models/hr_overtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def _compute_sheet(self):
date = fields.Date(
string="Date",
required=True,
default=fields.Date.today(),
default=lambda self: fields.Date.today(),
readonly=True,
states={
"draft": [
Expand All @@ -133,6 +133,7 @@ def _compute_sheet(self):
date_start = fields.Datetime(
required=True,
readonly=True,
default=lambda self: fields.Datetime.now(),
states={
"draft": [
("readonly", False),
Expand All @@ -142,6 +143,7 @@ def _compute_sheet(self):
date_end = fields.Datetime(
required=True,
readonly=True,
default=lambda self: fields.Datetime.now(),
states={
"draft": [
("readonly", False),
Expand Down Expand Up @@ -335,6 +337,7 @@ def _check_limit(self):
("state", "not in", ["cancel", "reject"]),
("id", "!=", self.id),
("date", "=", self.date),
("type_id", "=", self.type_id.id),
]
overtime_ids = self.search(criteria)
total_ot = 0.0
Expand Down

0 comments on commit 64fb265

Please sign in to comment.