diff --git a/pytest_odoo.py b/pytest_odoo.py index f153f4d..57d41ed 100644 --- a/pytest_odoo.py +++ b/pytest_odoo.py @@ -210,12 +210,11 @@ def disable_odoo_test_retry(): """ try: from odoo.tests import BaseCase - if hasattr(BaseCase, "run"): - del BaseCase.run - except ImportError: + del BaseCase.run + except (ImportError, AttributeError): + # Odoo <= 15.0 pass - def _find_manifest_path(collection_path: Path) -> Path: """Try to locate an Odoo manifest file in the collection path.""" # check if collection_path is an addon directory