From bd534c1861ce0cd67ebbf5c0c37f7fad357e6639 Mon Sep 17 00:00:00 2001 From: Ivan Yelizariev Date: Thu, 30 Dec 2021 14:30:25 +0000 Subject: [PATCH] [FIX] core: keep links in addons_path resolving the links may block reading static files if real path doesn't belong to addons_path. The problem is introduced on refactoring of the `load_manifest` function https://github.com/odoo/odoo/commit/2e29a9350306fd94fff19bc02821d7e7ab9c6f8b closes odoo/odoo#82081 Signed-off-by: Raphael Collet --- odoo/modules/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo/modules/module.py b/odoo/modules/module.py index 1b60622653b..716ca78b44a 100644 --- a/odoo/modules/module.py +++ b/odoo/modules/module.py @@ -12,7 +12,7 @@ import pkg_resources import re import sys import warnings -from os.path import join as opj, realpath +from os.path import join as opj, normpath import odoo import odoo.tools as tools @@ -386,7 +386,7 @@ def load_manifest(module, mod_path=None): manifest['auto_install'] = set(manifest['depends']) manifest['version'] = adapt_version(manifest['version']) - manifest['addons_path'] = realpath(opj(mod_path, os.pardir)) + manifest['addons_path'] = normpath(opj(mod_path, os.pardir)) return manifest