[FIX] hr_base: fix bug

This commit is contained in:
younes 2025-10-22 13:19:35 +01:00
parent 55bb9a30f5
commit f666b72333
1 changed files with 2 additions and 0 deletions

View File

@ -314,6 +314,8 @@ class HrEmployee(models.Model):
#override search method
@api.model
def name_search(self, name='', args=None, operator='ilike', limit=100):
if self._context.get('default_domain_force_all'):
self = self.sudo()
if operator not in ('ilike', 'like', '=', '=like', '=ilike') or not name:
return super(HrEmployee, self).name_search(name, args, operator, limit)
args = args or []