diff --git a/odoo/service/__init__.py b/odoo/service/__init__.py index 6d3c88697c4..5b2ff06dcb4 100644 --- a/odoo/service/__init__.py +++ b/odoo/service/__init__.py @@ -5,6 +5,9 @@ from . import db from . import model from . import server +# deprecated since 15.3 +from . import wsgi_server + #.apidoc title: RPC Services """ Classes of this module implement the network protocols that the diff --git a/odoo/service/wsgi_server.py b/odoo/service/wsgi_server.py new file mode 100644 index 00000000000..9229c3cf318 --- /dev/null +++ b/odoo/service/wsgi_server.py @@ -0,0 +1,11 @@ +import warnings +import odoo.http + + +def application(environ, start_response): + + warnings.warn("The WSGI application entrypoint moved from " + "odoo.service.wsgi_server.application to odoo.http.root " + "in 15.3.", + DeprecationWarning, stacklevel=1) + return odoo.http.root(environ, start_response) diff --git a/setup/odoo-wsgi.example.py b/setup/odoo-wsgi.example.py index 58b0d12653f..e6a8ff3a883 100644 --- a/setup/odoo-wsgi.example.py +++ b/setup/odoo-wsgi.example.py @@ -25,8 +25,7 @@ conf = odoo.tools.config # Path to the OpenERP Addons repository (comma-separated for # multiple locations) - -conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons' +#conf['addons_path'] = './odoo/addons,./addons' # Optional database config if not using local socket #conf['db_name'] = 'mycompany' @@ -38,7 +37,7 @@ conf['addons_path'] = '../../addons/trunk,../../web/trunk/addons' #---------------------------------------------------------- # Generic WSGI handlers application #---------------------------------------------------------- -application = odoo.service.wsgi_server.application +application = odoo.http.root odoo.service.server.load_server_wide_modules()