I have a user with the following access rights:
Accounting : Bookkeeper
Expense: Blank
Employees : Blank
Scenario: We have a 500+ employee construction company. Most of the employees take petty cash from the company and and submit the Expenses by the end of the month. We are handling the petty cash with Odoo default but the issue comes when the expenses are being entered. On behalf of the the normal employees, our accountants are entering the Expenses in Odoo. But these accountants are not allowed to see all the Employees information in Odoo (as per company policy).
When they are trying to select the Employee in the Expense entry screen, I am getting the following error,
Traceback (most recent call last): File "/data/build/odoo/odoo/http.py", line 1770, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) File "/data/build/odoo/odoo/service/model.py", line 133, in retrying result = func() File "/data/build/odoo/odoo/http.py", line 1797, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) File "/data/build/odoo/odoo/http.py", line 2001, in dispatch result = self.request.registry['ir.http']._dispatch(endpoint) File "/data/build/odoo/addons/website/models/ir_http.py", line 235, in _dispatch response = super()._dispatch(endpoint) File "/data/build/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch result = endpoint(**request.params) File "/data/build/odoo/odoo/http.py", line 725, in route_wrapper result = endpoint(self, *args, **params_ok) File "/data/build/odoo/addons/web/controllers/dataset.py", line 24, in call_kw return self._call_kw(model, method, args, kwargs) File "/data/build/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/data/build/odoo/odoo/api.py", line 464, in call_kw result = _call_kw_model(method, model, args, kwargs) File "/data/build/odoo/odoo/api.py", line 435, in _call_kw_model result = method(recs, *args, **kwargs) File "/data/build/odoo/odoo/models.py", line 1732, in name_search ids = self._name_search(name, args, operator, limit=limit, order=self._order) File "/data/build/odoo/odoo/models.py", line 1759, in _name_search return self._search(domain, limit=limit, order=order) File "/data/build/odoo/odoo/models.py", line 5397, in _search query = self._where_calc(domain) File "/data/build/odoo/odoo/models.py", line 5108, in _where_calc return expression.expression(domain, self).query File "/data/build/odoo/odoo/osv/expression.py", line 788, in __init__ self.expression = domain_combine_anies(domain, model) File "/data/build/odoo/odoo/osv/expression.py", line 597, in domain_combine_anies domain_any = _anyfy_leaves(domain, model) File "/data/build/odoo/odoo/osv/expression.py", line 379, in _anyfy_leaves raise ValueError(f"Invalid field {model._name}.{path[0]} in leaf {item}") ValueError: Invalid field hr.employee.public.filter_for_expense in leaf ('filter_for_expense', '=', True) The above server error caused the following client error: RPC_ERROR: Odoo Server Error at makeErrorFromResponse (https://62522949-17-0-all.runbot179.odoo.com/web/assets/73c4dc7/web.assets_web.min.js:2871:163) at XMLHttpRequest. (https://62522949-17-0-all.runbot179.odoo.com/web/assets/73c4dc7/web.assets_web.min.js:2875:13)
I have tested this in runbot also. Same error. What's the solution/alternative on this?