Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
better addons path detection, including 10.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed May 6, 2017
1 parent 2c4f22a commit 90bd451
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions travis/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,16 @@ def get_addons_path(travis_dependencies_dir, travis_build_dir, server_path):
addons_path_list = get_addons(travis_build_dir)
addons_path_list.extend(get_addons(travis_dependencies_dir))
addons_path_list.append(os.path.join(server_path, "addons"))
site_package_addons = os.environ['VIRTUAL_ENV'] + \
"/lib/python2.7/site-packages/odoo_addons"
if os.path.isdir(site_package_addons):
addons_path_list.append(site_package_addons)
try:
ap = __import__('odoo_addons').__path__
addons_path_list.extend(ap)
except ImportError:
pass
try:
ap = __import__('odoo.addons').addons.__path__
addons_path_list.extend(ap)
except ImportError:
pass
addons_path = ','.join(addons_path_list)
return addons_path

Expand Down

0 comments on commit 90bd451

Please sign in to comment.