[MERGE] Forward-port of branch 12.0 to 13.0

This commit is contained in:
Antoine Vandevenne (anv)
2021-07-20 12:53:44 +02:00
2 changed files with 17 additions and 8 deletions
+5
View File
@@ -60,6 +60,11 @@ sys.path.insert(0, str(extension_dir.absolute()))
# Search for the directory of odoo sources to know whether autodoc should be used on the dev doc
odoo_dir = Path('odoo')
odoo_dir_in_path = False
if not odoo_dir.is_dir():
parent_odoo_dir = Path('../odoo')
if parent_odoo_dir.is_dir():
_logger.info('Using parent dir to find odoo sources')
odoo_dir = parent_odoo_dir
if not odoo_dir.is_dir():
_logger.warning(
f"Could not find Odoo sources directory at {odoo_dir.absolute()}.\n"