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/cli | |
| 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/cli')
| -rw-r--r-- | odoo/cli/scaffold.py | 3 | ||||
| -rw-r--r-- | odoo/cli/start.py | 9 | ||||
| -rw-r--r-- | odoo/cli/templates/default/__manifest__.py.template (renamed from odoo/cli/templates/default/__openerp__.py.template) | 0 | ||||
| -rw-r--r-- | odoo/cli/templates/theme/__manifest__.py.template (renamed from odoo/cli/templates/theme/__openerp__.py.template) | 0 |
4 files changed, 6 insertions, 6 deletions
diff --git a/odoo/cli/scaffold.py b/odoo/cli/scaffold.py index bc5321a3b75..83c2befe96c 100644 --- a/odoo/cli/scaffold.py +++ b/odoo/cli/scaffold.py @@ -9,9 +9,6 @@ import jinja2 from . import Command -from odoo.modules.module import (get_module_root, MANIFEST, load_information_from_description_file as load_manifest) - - class Scaffold(Command): """ Generates an Odoo module skeleton. """ diff --git a/odoo/cli/start.py b/odoo/cli/start.py index 69058224117..043c411ad8d 100644 --- a/odoo/cli/start.py +++ b/odoo/cli/start.py @@ -2,12 +2,13 @@ # -*- coding: utf-8 -*- import argparse import glob +import itertools import os import sys from . import Command from .server import main -from odoo.modules.module import get_module_root, MANIFEST +from odoo.modules.module import get_module_root, MANIFEST_NAMES from odoo.service.db import _create_empty_database, DatabaseExists @@ -15,10 +16,12 @@ class Start(Command): """Quick start the Odoo server for your project""" def get_module_list(self, path): - mods = glob.glob(os.path.join(path, '*/%s' % MANIFEST)) + mods = itertools.chain.from_iterable( + glob.glob(os.path.join(path, '*/%s' % mname)) + for mname in MANIFEST_NAMES + ) return [mod.split(os.path.sep)[-2] for mod in mods] - def run(self, cmdargs): parser = argparse.ArgumentParser( prog="%s start" % sys.argv[0].split(os.path.sep)[-1], diff --git a/odoo/cli/templates/default/__openerp__.py.template b/odoo/cli/templates/default/__manifest__.py.template index 97b8372007c..97b8372007c 100644 --- a/odoo/cli/templates/default/__openerp__.py.template +++ b/odoo/cli/templates/default/__manifest__.py.template diff --git a/odoo/cli/templates/theme/__openerp__.py.template b/odoo/cli/templates/theme/__manifest__.py.template index f6d99c2be45..f6d99c2be45 100644 --- a/odoo/cli/templates/theme/__openerp__.py.template +++ b/odoo/cli/templates/theme/__manifest__.py.template |
