[FIX] module.py: Remove leftover "active" from manifest
The "active" field is a non-working deprecated alias to "auto_install", it does not work and was confusing users (see #59850). It has been removed. closes odoo/odoo#62086 Task: 2361729 Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,5 @@ and print the report from Print button in header area.
|
||||
'data/accounting_assert_test_data.xml',
|
||||
'report/report_account_test_templates.xml',
|
||||
],
|
||||
'active': False,
|
||||
'installable': True
|
||||
}
|
||||
|
||||
@@ -39,6 +39,5 @@ Set the payment reference type from the Sales Journal.
|
||||
"demo": [
|
||||
'demo/demo_company.xml',
|
||||
],
|
||||
"active": True,
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
@@ -59,5 +59,4 @@ Izvori podataka:
|
||||
'demo': [
|
||||
'demo/demo_company.xml',
|
||||
],
|
||||
"active": False,
|
||||
}
|
||||
|
||||
@@ -25,6 +25,5 @@ Updated for Odoo 9 by Bringsvor Consulting AS <www.bringsvor.com>
|
||||
'demo': [
|
||||
'demo/demo_company.xml',
|
||||
],
|
||||
"active": False,
|
||||
'post_init_hook': '_preserve_tag_on_taxes',
|
||||
}
|
||||
|
||||
@@ -140,8 +140,6 @@ Available manifest fields are:
|
||||
|
||||
These hooks should only be used when setup/cleanup required for this module
|
||||
is either extremely difficult or impossible through the api.
|
||||
``active`` (``bool``)
|
||||
This indicates whether this module must install automatically or not.
|
||||
|
||||
.. _semantic versioning: https://semver.org
|
||||
.. _existing categories:
|
||||
|
||||
+9
-10
@@ -320,23 +320,22 @@ def load_information_from_description_file(module, mod_path=None):
|
||||
with tools.file_open(readme_path[0]) as fd:
|
||||
info['description'] = fd.read()
|
||||
|
||||
# auto_install is set to `False` if disabled, and a set of
|
||||
# auto_install dependencies otherwise. That way, we can set
|
||||
# auto_install: [] to always auto_install a module regardless of its
|
||||
# dependencies
|
||||
auto_install = info.get('auto_install', info.get('active', False))
|
||||
if isinstance(auto_install, collections.abc.Iterable):
|
||||
info['auto_install'] = set(auto_install)
|
||||
|
||||
# auto_install is either `False` (by default) in which case the module
|
||||
# is opt-in, either a list of dependencies in which case the module is
|
||||
# automatically installed if all dependencies are (special case: [] to
|
||||
# always install the module), either `True` to auto-install the module
|
||||
# in case all dependencies declared in `depends` are installed.
|
||||
if isinstance(info['auto_install'], collections.abc.Iterable):
|
||||
info['auto_install'] = set(info['auto_install'])
|
||||
non_dependencies = info['auto_install'].difference(info['depends'])
|
||||
assert not non_dependencies,\
|
||||
"auto_install triggers must be dependencies, found " \
|
||||
"non-dependencies [%s] for module %s" % (
|
||||
', '.join(non_dependencies), module
|
||||
)
|
||||
elif auto_install:
|
||||
elif info['auto_install']:
|
||||
info['auto_install'] = set(info['depends'])
|
||||
else:
|
||||
info['auto_install'] = False
|
||||
|
||||
info['version'] = adapt_version(info['version'])
|
||||
return info
|
||||
|
||||
Reference in New Issue
Block a user