summaryrefslogtreecommitdiff
path: root/odoo/modules
diff options
context:
space:
mode:
authorJulien Castiaux <juc@odoo.com>2020-06-24 09:05:44 +0000
committerRaphael Collet <rco@odoo.com>2020-08-17 11:14:45 +0000
commit75b8e39bb26d9c459307f0a00d2b2e598bbb38a0 (patch)
treefce483a6ccad9da07556d55c3e2e2ebac1db9cc9 /odoo/modules
parent17ae856cc10634c5d1c88fdc01a61b0e1b876fc4 (diff)
[IMP] module.py: remove useless pkg_resources jinja hook
The `PackageLoader` jinja's loader purpose is to discover template files given a python module path. It was necessary to register a special hook into the import scheme of Odoo to support `import crm`, `import openerp` and `import openerp.addons` like module path. Since the support for those old module paths is deprecated since v13 and the jinja's team shows desire to remove support to `pkg_resource` utils as highlighted by #50552, it is better to remove it. closes odoo/odoo#53515 Task: 2282681 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'odoo/modules')
-rw-r--r--odoo/modules/module.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/odoo/modules/module.py b/odoo/modules/module.py
index 0223eea7f63..4859de455ff 100644
--- a/odoo/modules/module.py
+++ b/odoo/modules/module.py
@@ -62,10 +62,6 @@ class AddonsHook(object):
return odoo_module
-# need to register loader with setuptools as Jinja relies on it when using
-# PackageLoader
-pkg_resources.register_loader_type(AddonsHook, pkg_resources.DefaultProvider)
-
class OdooHook(object):
""" Makes odoo package also available as openerp """