If no addons-path provided, include the main addons

This commit is contained in:
Fabien Meghazi 2014-05-20 22:33:49 +02:00
parent a756b82372
commit 05f376e310
1 changed files with 3 additions and 1 deletions

View File

@ -433,7 +433,9 @@ class configmanager(object):
self.options['root_path'] = os.path.abspath(os.path.expanduser(os.path.expandvars(os.path.dirname(openerp.__file__))))
if not self.options['addons_path'] or self.options['addons_path']=='None':
self.options['addons_path'] = os.path.join(self.options['root_path'], 'addons')
base_addons = os.path.join(self.options['root_path'], 'addons')
main_addons = os.path.abspath(os.path.join(self.options['root_path'], '../addons'))
self.options['addons_path'] = '%s,%s' % (base_addons, main_addons)
else:
self.options['addons_path'] = ",".join(
os.path.abspath(os.path.expanduser(os.path.expandvars(x)))