diff options
| author | Olivier Dony <odo@openerp.com> | 2016-09-02 13:24:09 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2016-09-05 11:57:50 +0200 |
| commit | 4339196e5231aa734a0154e2f4e88b2e54f27d48 (patch) | |
| tree | a5e140610e000ced1fccea3cf24358efc6f06883 /odoo/http.py | |
| parent | c0566b289608f2ebb97ece4683440a551c8db9b9 (diff) | |
[IMP] support v10 manifest file naming convention
- As of v10, manifest files should be named `__manifest__.py`
- For backwards-compatibility, __openerp__.py manifest files
will still be supported for the time being
- Limited refactoring, to add support for the 2 different
naming conventions
- All textual references to __openerp_.py updated in
documentation and examples
Diffstat (limited to 'odoo/http.py')
| -rw-r--r-- | odoo/http.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/odoo/http.py b/odoo/http.py index 5fd3c727a2f..1a78a9250bb 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -23,6 +23,7 @@ import traceback import urllib2 import urlparse import warnings +from os.path import join as opj from zlib import adler32 import babel.core @@ -49,6 +50,8 @@ from odoo.service import security, model as service_model from odoo.tools.func import lazy_property from odoo.tools import ustr, consteq, frozendict +from odoo.modules.module import module_manifest + _logger = logging.getLogger(__name__) rpc_request = logging.getLogger(__name__ + '.rpc.request') rpc_response = logging.getLogger(__name__ + '.rpc.response') @@ -1307,13 +1310,13 @@ class Root(object): controllers and configure them. """ # TODO should we move this to ir.http so that only configured modules are served ? statics = {} - for addons_path in odoo.modules.module.ad_paths: for module in sorted(os.listdir(str(addons_path))): if module not in addons_module: - manifest_path = os.path.join(addons_path, module, '__openerp__.py') - path_static = os.path.join(addons_path, module, 'static') - if os.path.isfile(manifest_path) and os.path.isdir(path_static): + mod_path = opj(addons_path, module) + manifest_path = module_manifest(mod_path) + path_static = opj(addons_path, module, 'static') + if manifest_path and os.path.isdir(path_static): manifest = ast.literal_eval(open(manifest_path).read()) if not manifest.get('installable', True): continue |
