1

When I go to settings in users I'm getting the following error:

Invalid field 'documents_account_settings' on model 'res.config.settings'

I've been looking at the base code and it seems like the field documents_account_settings is not in the model anymore, the file I've been looking at is this /home/odoo/src/odoo/addons/account/models/res_config_settings.py

is there any known bug related to this?

This is the complete trace is the following:

Odoo Server Error
Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/odoo/src/odoo/odoo/http.py", line 683, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/src/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/http.py", line 347, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 912, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1377, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1369, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 394, in call_kw
    result = _call_kw_model_create(method, model, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 374, in _call_kw_model_create
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-188>", line 2, in create
  File "/home/odoo/src/odoo/odoo/api.py", line 323, in _model_create_single
    return create(self, arg)
  File "/home/odoo/src/odoo/addons/account/models/res_config_settings.py", line 176, in create
    return super(ResConfigSettings, self).create(values)
  File "<decorator-gen-64>", line 2, in create
  File "/home/odoo/src/odoo/odoo/api.py", line 344, in _model_create_multi
    return create(self, [arg])
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_fields.py", line 533, in create
    recs = super().create(vals_list)
  File "<decorator-gen-13>", line 2, in create
  File "/home/odoo/src/odoo/odoo/api.py", line 345, in _model_create_multi
    return create(self, arg)
  File "/home/odoo/src/odoo/odoo/models.py", line 3818, in create
    raise ValueError("Invalid field %r on model %r" % (key, self._name))
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 639, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/src/odoo/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
ValueError: Invalid field 'documents_account_settings' on model 'res.config.settings'
pedrommuller
  • 15,741
  • 10
  • 76
  • 126

2 Answers2

1

Normally, when we (developers) need something input from admin, we will create a field in res.config.settings to get it, so if you looked for it in module account, you may never see it, it is created by another module. This error caused you by not installing the right module, or more specify, you are opening a view where it show this field (documents_account_settings) but you don't have that field in your database.

There are 2 things (which I know) you can do in this situation to make it better:

  • Find where this field is created in your source code, and update or install that module, or easier (for Odoo users), update module base, it may reset problem module(s) in your database.
  • If you are a developer (which I prefer if true), you can go to your database, table ir_ui_view, find which view created that problem (inherit view named 'res.config.settings.view.form') and then alter the architecture part of it.

Hope you find this helping, because I can just show you the way to archive your goals, can not do it for you.

1

Make sure you have the installed app documents_account from this it will be initialized.

Kenly
  • 24,317
  • 7
  • 44
  • 60
Dipen Shah
  • 2,396
  • 2
  • 9
  • 21