Skip to content
Snippets Groups Projects

:hammer::sparkles: validator package does not assume a odoo.addons package name, provide full package name instead

Merged Vincent Hatakeyama requested to merge topic/18.0/change-validate-and-test into branch/18.0
1 file
+ 6
− 0
Compare changes
  • Side-by-side
  • Inline
+ 6
− 0
@@ -26,6 +26,9 @@
from typing import Any, LiteralString
import fastjsonschema # type: ignore[import-untyped]
from odoo.exceptions import UserError # type: ignore[import-untyped]
import fastjsonschema # type: ignore[import-untyped]
_logger = logging.getLogger(__name__)
@@ -78,6 +81,9 @@
for schema in module.get_schemas():
_add_schema(schemas, schema)
else:
if module.__file__ is None:
# XXX maybe not the best type of error
raise UserError("Module %s has no file", self.package_name)
# Fallback on searching schema json files
schema_search_path = os.path.dirname(module.__file__)
schema_search_path = os.path.abspath(
Loading