Skip to Content
Menu
This question has been flagged
2 Replies
4897 Views

The requested operation cannot be completed due to security restrictions. Please contact your system administrator.

(Document type: hr.employee, Operation: read)

we set a filter so employees can see their own records but on click record it gives an read access error.....

Avatar
Discard

The most significant area in Odoo/OpenERP is how to deal or manage users. Managing users and assigning groups or role is the key point in every business. In Odoo/OpenERP assigning role or group to the single user is made through Administrator. And its not a good practice to do so using login through admin and do some setting stuff like assigning groups to employee or users.

Reference: https://goo.gl/4jAhtH

Author Best Answer

error again:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 650, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\tools\pycompat.py", line 87, in reraise
    raise value
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 692, in dispatch
    result = self._call_function(**self.params)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 342, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\service\model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 335, in checked_call
    result = self.endpoint(*a, **kw)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 936, in __call__
    return self.method(*args, **kw)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\web\controllers\main.py", line 873, in search_read
    return self.do_search_read(model, fields, offset, limit, domain, sort)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\web\controllers\main.py", line 895, in do_search_read
    offset=offset or 0, limit=limit or False, order=sort or False)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 4218, in search_read
    records = self.search(domain or [], offset=offset, limit=limit, order=order)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 1480, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 3770, in _search
    self._apply_ir_rules(query, 'read')
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 3616, in _apply_ir_rules
    where_clause, where_params, tables = Rule.domain_get(self._name, mode)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\addons\base\ir\ir_rule.py", line 114, in domain_get
    query = self.env[model_name].sudo()._where_calc(dom, active_test=False)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\models.py", line 3564, in _where_calc
    e = expression.expression(domain, self)
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\osv\expression.py", line 668, in __init__
    self.parse()
  File "C:\Program Files (x86)\Odoo 11.0\server\odoo\osv\expression.py", line 846, in parse
    raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: Invalid field 'website_published' in leaf "<osv.ExtendedLeaf: ('website_published', '=', True) on hr_employee (ctx: )>"
Avatar
Discard

The field might not be present in the view or does not exist in the model.

Best Answer

Hi,

This is the access right issue, what you have to do is activate the developer mode and navigate to Settings -> Technical -> security -> Record Rules and search for the record rules of the model hr.employee.



You can make each of the record rules to set active is False and check whether the issue is okay and trace down which rule cause the issue and do necessary


Thanks

Avatar
Discard
Related Posts Replies Views Activity
2
Mar 18
4094
0
Mar 15
2939
0
Oct 24
156
3
May 24
4407
4
Jul 23
3046