summaryrefslogtreecommitdiff
path: root/openerp/modules/module.py
diff options
context:
space:
mode:
authorVo Minh Thu <vmt@openerp.com>2012-01-30 12:31:16 +0100
committerVo Minh Thu <vmt@openerp.com>2012-01-30 12:31:16 +0100
commitc22e8190da2bf05bd4ed8ffebfb3ac8f7b3179e2 (patch)
tree6ebe257d42fbf84c36aa25d4fb225b8f78681a31 /openerp/modules/module.py
parent15a8f081706f5714c8b0e9d8c87d8cc0d26edf17 (diff)
[IMP] manifest: still support the old `active` entry (but deprecate it and display a warning).
bzr revid: vmt@openerp.com-20120130113116-msjaej7jxp96tbvh
Diffstat (limited to 'openerp/modules/module.py')
-rw-r--r--openerp/modules/module.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/openerp/modules/module.py b/openerp/modules/module.py
index a731ae63b30..7f59f15a08d 100644
--- a/openerp/modules/module.py
+++ b/openerp/modules/module.py
@@ -48,6 +48,8 @@ import logging
import openerp.modules.db
import openerp.modules.graph
+_logger = logging.getLogger(__name__)
+
_ad = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'addons') # default addons path (base)
ad_paths = []
@@ -317,7 +319,6 @@ def load_information_from_description_file(module):
if os.path.isfile(terp_file) or zipfile.is_zipfile(mod_path+'.zip'):
# default values for descriptor
info = {
- 'active': False,
'application': False,
'author': '',
'category': 'Uncategorized',
@@ -343,6 +344,12 @@ def load_information_from_description_file(module):
with tools.file_open(terp_file) as terp_f:
info.update(eval(terp_f.read()))
+ if 'active' in info:
+ _logger.warning('The module `%s` uses the deprecated entry '
+ '`active` in its manifest file. It should use the entry '
+ '`auto_install`.', module)
+ info['auto_install'] = info['active']
+
return info
#TODO: refactor the logger in this file to follow the logging guidelines