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

Any Help about the below error is much appreciated.

An error occurred

Please use the copy button to report the error to your support service.

Traceback:
Error: fieldsViews is undefined
_generateActionViews/<@http://test.test.net/web/content/1905-03fafd9/web.assets_backend.js:447:298
_.forEach@http://test.test.net/web/content/1904-0b613ed/web.assets_common.js:108:566
_generateActionViews@http://test.test.net/web/content/1905-03fafd9/web.assets_backend.js:447:229
_executeWindowAction/<@http://test.test.net/web/content/1905-03fafd9/web.assets_backend.js:442:497

Avatar
Discard

In case, any possible clue, please suggest. Thanks

Best Answer

Please define your fieldsViews field in js file.

Like var fieldsViews or let fieldsViews

Avatar
Discard
Best Answer

For me this error occurred as an side effect of the following backend error below. And solution for this was to upgrade `resource` addon. This is a core addon and looks like it had a bug in one of previous v13 releases.


```

2021-06-01 00:22:36,813 1 INFO *** odoo.addons.base.models.ir_ui_view: Field `tz` does not exist


Error context:
View `hr.leave.view.form.manager`
[view_id: 4368, xml_id: hr_holidays.hr_leave_view_form_manager, model: hr.leave, parent_id: 4365]
2021-06-01 00:22:36,813 1 ERROR *** odoo.http: Exception during JSON request handling.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/usr/lib/python3/dist-packages/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 915, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1322, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1314, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 383, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/api.py", line 356, in _call_kw_model
result = method(recs, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1441, in load_views
for [v_id, v_type] in views
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1441, in
for [v_id, v_type] in views
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 410, in fields_view_get
res = super(MailThread, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
File "/usr/lib/python3/dist-packages/odoo/addons/web/models/models.py", line 206, in fields_view_get
r = super().fields_view_get(view_id, view_type, toolbar, submenu)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1528, in fields_view_get
xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result['arch']), view_id)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 987, in postprocess_and_fields
self.raise_view_error(message, view_id)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 614, in raise_view_error
raise ValueError(message)
ValueError: Field `tz` does not exist

Error context:
View `hr.leave.view.form.manager`
[view_id: 4368, xml_id: hr_holidays.hr_leave_view_form_manager, model: hr.leave, parent_id: 4365]
```


Avatar
Discard

There can be other causes also. Looking at the logs can give useful info.