[IMP] core: formally deprecate __openerp__.py manifests.
`__manifest__.py` was introduced in Odoo 10 and quickly migrated
to (c758e9043a fixed the last holdouts).
Deprecate old manifests. People who need the compatibility can just
add a symlink (or duplicate the file if they're working on FAT or an
old os where core.symlinks can't be set to `true`).
closes odoo/odoo#103952
Signed-off-by: Raphael Collet <rco@odoo.com>
This commit is contained in:
+10
-2
@@ -316,8 +316,16 @@ def module_manifest(path):
|
||||
if not path:
|
||||
return None
|
||||
for manifest_name in MANIFEST_NAMES:
|
||||
if os.path.isfile(opj(path, manifest_name)):
|
||||
return opj(path, manifest_name)
|
||||
candidate = opj(path, manifest_name)
|
||||
if os.path.isfile(candidate):
|
||||
if manifest_name == '__openerp__.py':
|
||||
warnings.warn(
|
||||
"__openerp__.py manifests are deprecated since 17.0, "
|
||||
f"rename {candidate!r} to __manifest__.py "
|
||||
"(valid since 10.0)",
|
||||
category=DeprecationWarning
|
||||
)
|
||||
return candidate
|
||||
|
||||
def get_module_root(path):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user