mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-25 17:32:03 +02:00
19.0 vanilla
This commit is contained in:
parent
e1d89e11e3
commit
a1f02d8cc7
225 changed files with 2335 additions and 775 deletions
|
|
@ -201,6 +201,14 @@ class HrAttendance(http.Controller):
|
|||
|
||||
@http.route('/hr_attendance/employees_infos', type="jsonrpc", auth="public")
|
||||
def employees_infos(self, token, limit, offset, domain):
|
||||
for condition in domain:
|
||||
field_name, operator, _value = condition # Force '&' implicit syntax
|
||||
if field_name not in ('name', 'department_id') or operator not in ('=', 'ilike'):
|
||||
raise UserError(_(
|
||||
"Invalid domain, use 'name' and/or 'department_id' fields "
|
||||
"with '=' and/or 'ilike' operators.",
|
||||
))
|
||||
|
||||
company = self._get_company(token)
|
||||
if company:
|
||||
domain = Domain(domain) & Domain('company_id', '=', company.id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue