oca-ocb-core/odoo-bringout-oca-ocb-base/doc/DATABASE_INIT.md
2025-08-29 15:20:45 +02:00

26 lines
781 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Database Initialization & Fixes
This package includes critical fixes ensuring smooth database initialization on Odoo 16 with Python 3.11+.
## Module Categories Fix
Issue: missing module categories referenced by `ir_module_module.xml` during init.
Fix: add the categories to `base` data (`ir_module_category_data.xml`).
Impact: DB initializes cleanly; no more `External ID not found` errors.
## Python 3.11 Addons Path Fix
Issue: `_NamespacePath` cannot be `+`-concatenated with lists (Python 3.11+), breaking addons path handling.
Fix: cast namespace path to list before concatenation:
```python
# BEFORE
addons_paths = odoo.addons.__path__ + [root_path]
# AFTER
addons_paths = list(odoo.addons.__path__) + [root_path]
```
Impact: runtime stable on Python 3.113.12.