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

[cgscop #179] check sur ressource sans company_id ou avec company_id = user.company_id

parent 79136f97
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -115,6 +115,8 @@ class ScopHrTimesheet(models.Model): ...@@ -115,6 +115,8 @@ class ScopHrTimesheet(models.Model):
for line in self: for line in self:
dt = datetime.combine(line.date, time(12, 00)) dt = datetime.combine(line.date, time(12, 00))
holiday = self.env['resource.calendar.leaves'].search([ holiday = self.env['resource.calendar.leaves'].search([
'|',
('company_id', '=', False),
('company_id', '=', self.env.user.company_id.id), ('company_id', '=', self.env.user.company_id.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