Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] namespace packages #98

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions odoo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
#----------------------------------------------------------
import pkgutil
import os.path
__path__ = [
os.path.abspath(path)
for path in pkgutil.extend_path(__path__, __name__)
]
__path__ = pkgutil.extend_path(__path__, __name__)

import sys
MIN_PY_VERSION = (3, 7)
Expand Down
25 changes: 0 additions & 25 deletions odoo/addons/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion odoo/tools/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def file_path(file_path, filter_ext=('',), env=None):
:raise ValueError: if the file doesn't have one of the supported extensions (`filter_ext`)
"""
root_path = os.path.abspath(config['root_path'])
addons_paths = odoo.addons.__path__ + [root_path]
addons_paths = list(odoo.addons.__path__) + [root_path]
if env and hasattr(env.transaction, '__file_open_tmp_paths'):
addons_paths += env.transaction.__file_open_tmp_paths
is_abs = os.path.isabs(file_path)
Expand Down