When I try to save any config I'm getting the following error:
Error: Odoo Server Error
ValueError: Invalid field 'recaptcha_public_key' on model 'res.config.settings'
The complete trace is the following:
Odoo Server Error
Traceback (most recent call last):
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\addons\base\models\ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\service\model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\http.py", line 912, in __call__
return self.method(*args, **kw)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\http.py", line 531, in response_wrap
response = f(*args, **kw)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\addons\web\controllers\main.py", line 1389, in call_kw
return self._call_kw(model, method, args, kwargs)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\addons\web\controllers\main.py", line 1381, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\api.py", line 394, in call_kw
result = _call_kw_model_create(method, model, args, kwargs)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\api.py", line 374, in _call_kw_model_create
result = method(recs, *args, **kwargs)
File "<decorator-gen-96>", line 2, in create
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\api.py", line 323, in _model_create_single
return create(self, arg)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\addons\base\models\res_config.py", line 783, in create
return super(ResConfigSettings, self).create(values)
File "<decorator-gen-65>", line 2, in create
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\api.py", line 344, in _model_create_multi
return create(self, [arg])
File "C:\Program Files\Odoo 14.0.20210511\server\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 "C:\Program Files\Odoo 14.0.20210511\server\odoo\api.py", line 345, in _model_create_multi
return create(self, arg)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\models.py", line 3825, 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 "C:\Program Files\Odoo 14.0.20210511\server\odoo\http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\Program Files\Odoo 14.0.20210511\server\odoo\http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Invalid field 'recaptcha_public_key' on model 'res.config.settings'
Answer here, that's because some module was missing. search odoo source code with recaptcha_public_key we can see the module name is google_recaptcha.
In your system open Apps page, search that module and install will resolve your problem. Or you can install it by command line bellow (need restart server after that):
./odoo-bin -d <yourdbname> -i google_recaptcha
This message is simply because you try create a record and in the values passed to create it a field is filled in but isn't present in the model.
But with only this error log. I can't more help you.
Possible error:
In the file __init__.py of your folder models you don't import your file (Example : from . import config)
In the file __init__.py of your module, you don't import your folder models (from . import models)
Missing a dependence, file with this field could be in module 1 and you try to create record with this field in module 2, but no depend exist between module 1 and 2.
Problem this creation of the field.
Bad updating of module. You add the field but the don't update module. (-u your_module OR with the interface)
Related
I am trying to setup odoo on my mac by following the instructions linked on the github page. When starting the server using this command:
python3 odoo-bin --addons-path=addons -d mydb -i base
The server starts and I see one database "mydb" on the odoo splash page. Then when I click that database I get the following error:
ERROR mydb werkzeug: Error on request:
Traceback (most recent call last):
File "/Users/[username]/Documents/GitHub/odoo/venv/lib/python3.8/site-packages/werkzeug/serving.py", line 270, in run_wsgi
execute(self.server.app)
File "/Users/[username]/Documents/GitHub/odoo/venv/lib/python3.8/site-packages/werkzeug/serving.py", line 258, in execute
application_iter = app(environ, start_response)
File "/Users/[username]/Documents/GitHub/odoo/odoo/service/server.py", line 439, in app
return self.app(e, s)
File "/Users/[username]/Documents/GitHub/odoo/odoo/service/wsgi_server.py", line 142, in application
return application_unproxied(environ, start_response)
File "/Users/[username]/Documents/GitHub/odoo/odoo/service/wsgi_server.py", line 117, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 1287, in __call__
return self.dispatch(environ, start_response)
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 1257, in __call__
return self.app(environ, start_wrapped)
File "/Users/[username]/Documents/GitHub/odoo/venv/lib/python3.8/site-packages/werkzeug/wsgi.py", line 766, in __call__
return self.app(environ, start_response)
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 1457, in dispatch
result = ir_http._dispatch()
File "/Users/[username]/Documents/GitHub/odoo/addons/web_editor/models/ir_http.py", line 21, in _dispatch
return super(IrHttp, cls)._dispatch()
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_http.py", line 238, in _dispatch
return cls._handle_exception(e)
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_http.py", line 206, in _handle_exception
return request._handle_exception(exception)
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 750, in _handle_exception
return super(HttpRequest, self)._handle_exception(exception)
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_http.py", line 234, in _dispatch
result = request.dispatch()
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 809, in dispatch
r = self._call_function(**self.params)
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/Users/[username]/Documents/GitHub/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 342, in checked_call
result.flatten()
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 1236, in flatten
self.response.append(self.render())
File "/Users/[username]/Documents/GitHub/odoo/odoo/http.py", line 1229, in render
return env["ir.ui.view"].render_template(self.template, self.qcontext)
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_ui_view.py", line 1177, in render_template
return self.browse(self.get_view_id(template)).render(values, engine)
File "/Users/[username]/Documents/GitHub/odoo/addons/web_editor/models/ir_ui_view.py", line 27, in render
return super(IrUiView, self).render(values=values, engine=engine, minimal_qcontext=minimal_qcontext)
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_ui_view.py", line 1185, in render
return self.env[engine].render(self.id, qcontext)
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_qweb.py", line 58, in render
result = super(IrQWeb, self).render(id_or_xml_id, values=values, **context)
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/qweb.py", line 260, in render
self.compile(template, options)(self, body.append, values or {})
File "<decorator-gen-53>", line 2, in compile
File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/ir_qweb.py", line 113, in compile
return super(IrQWeb, self).compile(id_or_xml_id, options=options)
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/qweb.py", line 323, in compile
raise QWebException("Error when compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name)
odoo.addons.base.models.qweb.QWebException: Name node can't be used with 'None' constant
Traceback (most recent call last):
File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/cache.py", line 85, in lookup
r = d[key]
File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/func.py", line 69, in wrapper
return func(self, *args, **kwargs)
File "/Users/[username]/Documents/GitHub/odoo/odoo/tools/lru.py", line 44, in __getitem__
a = self.d[obj].me
KeyError: ('ir.qweb', <function IrQWeb.compile at 0x7f9436306310>, 196, ('en_US', None, None, None, None, None))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/[username]/Documents/GitHub/odoo/odoo/addons/base/models/qweb.py", line 315, in compile
unsafe_eval(compile(astmod, '<template>', 'exec'), ns)
ValueError: Name node can't be used with 'None' constant
Error when compiling AST
ValueError: Name node can't be used with 'None' constant
Template: web.login
Path: /t/t/form/input[2]
Node: <input type="hidden" name="redirect" t-att-value="redirect"/> - - -
I don't know where to start with this error. I have looked up the web.login template and didnt find anything.
This is a bug in Odoo. It was probably silent before but it is now causing a crash since a recent version of Python 3.8. You could downgrade to an earlier version (like python-3.8.3) temporarily until Odoo is fixed.
More here
The solution to this issue is to downgrade the version of python you are running on. If suppose you are running on python3.8, you should downgrade to python 3.6 as explained by Husain Rangwala in this article https://www.odoo.com/forum/help-1/valueerror-name-node-can-t-be-used-with-none-constant-template-1105-path-templates-t-t-div-t-t-after-updating-to-python-3-8-5-177836. To switch between python versions, visit https://hackersandslackers.com/multiple-versions-python-ubuntu/
I have developped this module but I can not run it, i keep getting this error track and no idea what it is, thanks in adcance.
Traceback (most recent call last):
File "C:\Users\Utilisateur\git\persol\odoo\openerp\http.py", line 405, in response_wrap
response = f(*args, **kw)
File "C:\Users\Utilisateur\git\persol\odoo\addons\web\controllers\main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "C:\Users\Utilisateur\git\persol\odoo\addons\web\controllers\main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\addons\base\module\module.py", line 447, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\addons\base\module\module.py", line 495, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\modules\registry.py", line 370, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\modules\loading.py", line 355, in load_modules
loaded_modules, update_module)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\modules\loading.py", line 255, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\modules\loading.py", line 176, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "C:\Users\Utilisateur\git\persol\odoo\openerp\modules\loading.py", line 118, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\tools\convert.py", line 894, in convert_file
convert_csv_import(cr, module, pathname, fp.read(), idref, mode, noupdate)
File "C:\Users\Utilisateur\git\persol\odoo\openerp\tools\convert.py", line 962, in convert_csv_import
raise Exception(_('Module loading %s failed: file %s could not be processed:\n %s') % (module, fname, warning_msg))
Exception: Module loading mgmtsystem_dysfunction failed: file mgmtsystem_dysfunction\security/ir.model.access.csv could not be processed:
Line 1 : id,"name","model_id
See the error in the last line, tells:
Line 1 : id,"name","model_id
This is because the CSV file is ill-formed. Go to such file (indicated one line above as: mgmtsystem_dysfunction\security/ir.model.access.csv) and either balance the double quotes (the last one is missing) or remove them.
I am using odoo v9 community in Ubuntu 14.04 installation is perfectly done after all works.
but when i install website module of odoo and after i log out from odoo it show following error:
"500: Internal Server Error"
and my log:
"Traceback (most recent call last):
File "/opt/odoo96/addons/website/models/ir_http.py", line 242, in _handle_exception
response = super(ir_http, self)._handle_exception(exception)
File "/opt/odoo96/openerp/addons/base/ir/ir_http.py", line 147, in _handle_exception
return request._handle_exception(exception)
File "/opt/odoo96/openerp/http.py", line 738, in _handle_exception
return super(HttpRequest, self)._handle_exception(exception)
File "/opt/odoo96/openerp/addons/base/ir/ir_http.py", line 172, in _dispatch
result = request.dispatch()
File "/opt/odoo96/openerp/http.py", line 769, in dispatch
r = self._call_function(**self.params)
File "/opt/odoo96/openerp/http.py", line 316, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo96/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo96/openerp/http.py", line 309, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo96/openerp/http.py", line 888, in __call__
return self.method(*args, **kw)
File "/opt/odoo96/openerp/http.py", line 466, in response_wrap
response = f(*args, **kw)
File "/opt/odoo96/addons/website/controllers/main.py", line 44, in index
return request.registry['ir.http'].reroute(first_menu.url)
File "/opt/odoo96/addons/website/models/ir_http.py", line 209, in reroute
return self._dispatch()
File "/opt/odoo96/addons/website/models/ir_http.py", line 175, in _dispatch
key = self.get_page_key()
File "/opt/odoo96/addons/website/models/ir_http.py", line 94, in get_page_key
return (self._name, "cache", request.uid, request.lang, request.httprequest.full_path)
AttributeError: 'Request' object has no attribute 'full_path'"
but when i uninstall web module all working well again. how can i solve this ?
Thanks
Its a dependency issue.
Install a newer version of werkzeug.
https://github.com/odoo/odoo/issues/10184
pip install werkzeug==0.9.4
Should do the trick.
I'm developing an OpenERP module and it contains too many class and when i try to install it i go that errors and i can't find which class have this error what should i do (i develop with eclipse IDE)
Traceback (most recent call last):
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\http.py", line 517, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\http.py", line 538, in dispatch
result = self._call_function(**self.params)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\http.py", line 294, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\service\model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\http.py", line 291, in checked_call
return self.endpoint(*a, **kw)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\http.py", line 754, in __call__
return self.method(*args, **kw)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\http.py", line 387, in response_wrap
response = f(*args, **kw)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\addons\web\controllers\main.py", line 953, in call_button
action = self._call_kw(model, method, args, {})
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\addons\web\controllers\main.py", line 941, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\addons\base\module\module.py", line 450, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\api.py", line 237, in wrapper
return old_api(self, *args, **kwargs)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\addons\base\module\module.py", line 498, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\modules\registry.py", line 341, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\modules\loading.py", line 358, in load_modules
loaded_modules, update_module)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\modules\loading.py", line 263, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\modules\loading.py", line 158, in load_module_graph
models = registry.load(cr, package)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\modules\registry.py", line 148, in load
model = cls._build_model(self, cr)
File "C:\Users\Mostafa\PycharmProjects\odoo\odoo8\openerp\models.py", line 653, in _build_model
'_inherits': dict(cls._inherits),
ValueError: dictionary update sequence element #0 has length 11; 2 is required
It's very hard (verging on impossible) to answer without seeing your actual code. The problem is clearly in _inherits definition in one of your models.
Most likely you mixed up _inherits and _inherit. While the later one can be a either a list or a single string, _inherits has to be a dictionary.
It seems you might have erroneously defined _inherits as a list (instead of dict), because you really intended to use _inherit.
'_inherits': dict(cls._inherits), you just check it out whether you did right way or not. i am also beginner in openErp.but i think you have problem with this line. and Mr.Ludwik is correct without knowing the codes how can be possible to tell the error.
My app started throwing this error last night. Users are complaining the site is slow as well. Still on Python 2.5. As far as I can tell the request itself is not unusual.
Any ideas?
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 703, in __call__
handler.post(*groups)
File "/base/data/home/apps/s~jupitersfolly/4.357517623694016771/controller/frequest.py", line 57, in post
request_types[request_type]()
File "/base/data/home/apps/s~jupitersfolly/4.357517623694016771/controller/frequest.py", line 78, in order
event, report, messages = Game.update(game_number, user_id, order)
File "/base/data/home/apps/s~jupitersfolly/4.357517623694016771/model/game.py", line 355, in update
event, report, game, universe, messages, updated, ended = db.run_in_transaction(Game.transactional_update, key_id, user_id, order)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 2433, in RunInTransaction
return RunInTransactionOptions(None, function, *args, **kwargs)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 2571, in RunInTransactionOptions
ok, result = _DoOneTry(new_connection, function, args, kwargs)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 2593, in _DoOneTry
result = function(*args, **kwargs)
File "/base/data/home/apps/s~jupitersfolly/4.357517623694016771/model/game.py", line 348, in transactional_update
game.put()
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1074, in put
return datastore.Put(self._entity, **kwargs)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/datastore.py", line 579, in Put
return PutAsync(entities, **kwargs).get_result()
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 604, in get_result
return self.__get_result_hook(self)
File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 1577, in __put_hook
self.check_rpc_success(rpc)
File "/base/python_runtime/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 1212, in check_rpc_success
rpc.check_success()
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 570, in check_success
self.__rpc.CheckSuccess()
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 133, in CheckSuccess
raise self.exception
ArgumentError: An error occurred parsing (locally or remotely) the arguments to datastore_v3.Put()