[IMP] manifest: still support the old `active` entry (but deprecate it and display a warning).
bzr revid: vmt@openerp.com-20120130113116-msjaej7jxp96tbvh
This commit is contained in:
parent
15a8f08170
commit
c22e8190da
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue