Multi-company fixes in hr_holidays_usability
This commit is contained in:
@@ -14,7 +14,9 @@ class HrHolidaysMassAllocation(models.TransientModel):
|
|||||||
@api.model
|
@api.model
|
||||||
def _default_employees(self):
|
def _default_employees(self):
|
||||||
return self.env['hr.employee'].search([
|
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
|
@api.model
|
||||||
def _get_default_holiday_status(self):
|
def _get_default_holiday_status(self):
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class HrHolidaysPost(models.TransientModel):
|
|||||||
('state', '=', 'validate'),
|
('state', '=', 'validate'),
|
||||||
('posted_date', '=', False),
|
('posted_date', '=', False),
|
||||||
('vacation_date_to', '<=', self.before_date),
|
('vacation_date_to', '<=', self.before_date),
|
||||||
|
('company_id', '=', self.env.user.company_id.id),
|
||||||
])
|
])
|
||||||
self.write({
|
self.write({
|
||||||
'state': 'done',
|
'state': 'done',
|
||||||
|
|||||||
Reference in New Issue
Block a user