[IMP] core: enforce explicit license in all manifest

The license was missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.

The missing licenses were add in all version starting from
12.0 in repos odoo, enterprise and design-themes.

Starting from this commit, when a license is not defined,
a warning will be triggered.

closes odoo/odoo#74347

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
This commit is contained in:
Xavier-Do
2021-07-30 12:34:11 +00:00
parent e470cf945f
commit e27340066b
2 changed files with 4 additions and 1 deletions
@@ -18,4 +18,5 @@ and link with originating sale order.
],
'installable': True,
'auto_install': True,
'license': 'LGPL-3',
}
+3 -1
View File
@@ -330,7 +330,6 @@ def load_information_from_description_file(module, mod_path=None):
'description': '',
'icon': get_module_icon(module),
'installable': True,
'license': 'LGPL-3',
'post_load': None,
'version': '1.0',
'web': False,
@@ -355,6 +354,9 @@ def load_information_from_description_file(module, mod_path=None):
with tools.file_open(readme_path[0]) as fd:
info['description'] = fd.read()
if not info.get('license'):
info['license'] = 'LGPL-3'
_logger.warning("Missing `license` key in manifest for '%s', defaulting to LGPL-3", module)
# 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