Skip to content
Extraits de code Groupes Projets
Valider 3a3dc05f rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

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

parent fe12002d
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -165,8 +165,8 @@ class ScopHrTimesheet(models.Model): ...@@ -165,8 +165,8 @@ class ScopHrTimesheet(models.Model):
) )
total = sum(lines.mapped("unit_amount")) total = sum(lines.mapped("unit_amount"))
if ( if (
not self.env.user.company_id.day_working not self.env.company.day_working
and total > self.env.user.company_id.day_duration and total > self.env.company.day_duration
): ):
raise ValidationError( raise ValidationError(
_( _(
...@@ -174,7 +174,7 @@ class ScopHrTimesheet(models.Model): ...@@ -174,7 +174,7 @@ class ScopHrTimesheet(models.Model):
"Journée du %s" "Journée du %s"
) )
% ( % (
self.env.user.company_id.day_duration, self.env.company.day_duration,
record.date.strftime("%d/%m/%Y"), record.date.strftime("%d/%m/%Y"),
) )
) )
...@@ -187,7 +187,7 @@ class ScopHrTimesheet(models.Model): ...@@ -187,7 +187,7 @@ class ScopHrTimesheet(models.Model):
[ [
"|", "|",
("company_id", "=", False), ("company_id", "=", False),
("company_id", "=", self.env.user.company_id.id), ("company_id", "=", self.env.company.id),
("date_from", "<=", dt), ("date_from", "<=", dt),
("date_to", ">=", dt), ("date_to", ">=", dt),
] ]
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter