OCA / server-tools

Tools for Odoo Administrators to improve some technical features on Odoo.
https://odoo-community.org/psc-teams/tools-30
GNU Affero General Public License v3.0
705 stars 1.5k forks source link

[16.0] dbfilter_from_header: RuntimeError: object unbound - - - #2594

Open danielosser opened 1 year ago

danielosser commented 1 year ago

Module

dbfilter_from_header

Describe the bug

after installing module version 16.0.1.0.0 on Odoo 16 Enterprise server error occurs.

Error log

Traceback (most recent call last):
  File "/opt/odoo/.local/lib/python3.9/site-packages/werkzeug/serving.py", line 306, in run_wsgi
    execute(self.server.app)
  File "/opt/odoo/.local/lib/python3.9/site-packages/werkzeug/serving.py", line 294, in execute
    application_iter = app(environ, start_response)
  File "/opt/odoo/odoo16/odoo/http.py", line 1942, in __call__
    request = Request(httprequest)
  File "/opt/odoo/odoo16/odoo/http.py", line 1101, in __init__
    self.session, self.db = self._get_session_and_dbname()
  File "/opt/odoo/odoo16/odoo/http.py", line 1133, in _get_session_and_dbname
    if session.db and db_filter([session.db], host=host):
  File "/opt/odoo/shared/odoo16/development/oca_server_tools/dbfilter_from_header/override.py", line 17, in db_filter
    httprequest = http.request.httprequest
  File "/opt/odoo/.local/lib/python3.9/site-packages/werkzeug/local.py", line 348, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/opt/odoo/.local/lib/python3.9/site-packages/werkzeug/local.py", line 307, in _get_current_object
    return self.__local()
  File "/opt/odoo/.local/lib/python3.9/site-packages/werkzeug/local.py", line 137, in _lookup
    raise RuntimeError("object unbound")
RuntimeError: object unbound - - -
iTech-eg commented 1 year ago

any solution about this issue...