Skip to content
Snippets Groups Projects
Commit 3a3dc05f authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[fix] change env.user.company_id to env.company

parent fe12002d
No related branches found
No related tags found
No related merge requests found
......@@ -165,8 +165,8 @@ class ScopHrTimesheet(models.Model):
)
total = sum(lines.mapped("unit_amount"))
if (
not self.env.user.company_id.day_working
and total > self.env.user.company_id.day_duration
not self.env.company.day_working
and total > self.env.company.day_duration
):
raise ValidationError(
_(
......@@ -174,7 +174,7 @@ class ScopHrTimesheet(models.Model):
"Journée du %s"
)
% (
self.env.user.company_id.day_duration,
self.env.company.day_duration,
record.date.strftime("%d/%m/%Y"),
)
)
......@@ -187,7 +187,7 @@ class ScopHrTimesheet(models.Model):
[
"|",
("company_id", "=", False),
("company_id", "=", self.env.user.company_id.id),
("company_id", "=", self.env.company.id),
("date_from", "<=", dt),
("date_to", ">=", dt),
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment