Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3997 Widoki

Hello

I got this error when I want to open the kanban view of hr.employee.


The only field 'has_badges' is not on my customs addons but in the odoo addons 'gamification' and it is well installed, and as there is not context ([view_id: n/a, xml_id: n/a, model: n/a, parent_id: n/a]), I have no idea how to correct that.


I already tried to upgrade hr.employee and gamification have bee well installed.


Thanks for you help.



Odoo Server Error
Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 654, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 312, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/odoo/tools/pycompat.py", line 87, in reraise
    raise value
  File "/opt/odoo/odoo/http.py", line 696, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/http.py", line 344, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/http.py", line 337, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/http.py", line 939, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/http.py", line 517, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 962, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/main.py", line 954, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 745, in call_kw
    return _call_kw_model(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 718, in _call_kw_model
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/odoo/models.py", line 1370, in load_views
    for [v_id, v_type] in views
  File "/opt/odoo/odoo/models.py", line 1370, in <dictcomp>
    for [v_id, v_type] in views
  File "/opt/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 "/opt/odoo/odoo/models.py", line 1456, in fields_view_get
    xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result['arch']), view_id)
  File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 1092, in postprocess_and_fields
    self.raise_view_error(message, view_id)
  File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 545, in raise_view_error
    raise ValueError(message)
ValueError: Field `has_badges` does not exist

Error context:
View `n/a`
[view_id: n/a, xml_id: n/a, model: n/a, parent_id: n/a]
Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

The error is thrown when a field is used in XML views but is not defined inside the corresponding model.So here is what you can do: if the database is accessible,activate the developer mode and navigate to Settings -> Technical -> User Interface -> Views and search for your field inside the architecture.Then you will be getting the views containing this field. Open and remove those fields from these views if they are not being used or have to be removed.

Or find the models in which this field is used, add this field to the corresponding modules, and restart and upgrade the module. Also, you can try upgrading modules from the terminal if the database is not accessible.

Hope it helps

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 23
3112
0
mar 24
3396
2
mar 18
5078
1
maj 23
18143
2
gru 23
10121