Multi-company fixes in hr_holidays_usability

This commit is contained in:
Alexis de Lattre
2017-05-22 19:33:14 +02:00
parent b8b307154a
commit 9267fca881
2 changed files with 4 additions and 1 deletions

View File

@@ -14,7 +14,9 @@ class HrHolidaysMassAllocation(models.TransientModel):
@api.model
def _default_employees(self):
return self.env['hr.employee'].search([
('holiday_exclude_mass_allocation', '=', False)])
('holiday_exclude_mass_allocation', '=', False),
('company_id', '=', self.env.user.company_id.id),
])
@api.model
def _get_default_holiday_status(self):

View File

@@ -39,6 +39,7 @@ class HrHolidaysPost(models.TransientModel):
('state', '=', 'validate'),
('posted_date', '=', False),
('vacation_date_to', '<=', self.before_date),
('company_id', '=', self.env.user.company_id.id),
])
self.write({
'state': 'done',