[FIX] hr_expense: Fix employee_id search domain
Fix a bug introduced where the search domain returned is a string instead of a list on the employee_id task-3358176 Part-of: odoo/odoo#130244
This commit is contained in:
@@ -45,7 +45,7 @@ class Employee(models.Model):
|
||||
|
||||
res = [('id', '=', 0)] # Nothing accepted by domain, by default
|
||||
if self.user_has_groups('hr_expense.group_hr_expense_user') or self.user_has_groups('account.group_account_user'):
|
||||
res = "['|', ('company_id', '=', False), ('company_id', '=', company_id)]" # Then, domain accepts everything
|
||||
res = ['|', ('company_id', '=', False), ('company_id', 'child_of', self.env.company.root_id.id)] # Then, domain accepts everything
|
||||
elif self.user_has_groups('hr_expense.group_hr_expense_team_approver') and self.env.user.employee_ids:
|
||||
user = self.env.user
|
||||
employee = self.env.user.employee_id
|
||||
|
||||
Reference in New Issue
Block a user