[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:
@@ -18,4 +18,5 @@ and link with originating sale order.
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': True,
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user