Skip to content

unclecatvn/agent-skills / skills/odoo-19.0

odoo-19

Verified

Odoo 19 development knowledge base with 18 specialized guides covering Actions (ir.actions.*, cron jobs, server actions), Controllers (HTTP routing, endpoints, auth types), Data files (XML/CSV records, shortcuts, noupdate), API Decorators (@api.depends, @api.constrains, @api.ondelete, @api.onchange, @api.model, @api.private), SQL Constraints (models.Constraint replacing _sql_constraints), Database Indexes (models.Index), Module development (manifest, wizards, reports), Field types (Char, Text, Monetary, relational fields), Manifest configuration (__manifest__.py, dependencies, asset bundles), Mixins (mail.thread, mail.activity.mixin, mail.alias.mixin, utm.mixin), ORM Model methods (search, CRUD, domain filters, recordsets, CamelCase model naming), Migration scripts (pre/post/end hooks, data migration), OWL frontend components (hooks, services, lifecycle), Performance optimization (N+1 prevention, batch ops, _read_group), QWeb Reports (PDF/HTML, paper formats, barcodes, t-out), Security/ACL (record rules, field permissions, privilege-based groups, @api.private), Testing (TransactionCase, HttpCase, mocking, query count assertions), Transactions (savepoints, UniqueViolation, serialization failures), Translations (i18n, PO files, translatable fields), XML Views (list/form/search, kanban card templates, xpath inheritance, QWeb templates). Use when writing, reviewing, or debugging any Odoo 19 Python or XML code, creating or modifying modules, fixing performance issues, or looking up Odoo 19 API patterns and best practices. Includes CSS/SCSS asset authoring and review for Odoo addons.

references/odoo-19-manifest-guide.md

View on GitHub
# Odoo 19 Manifest Guide

## Coding Conventions

Load security before views and actions before menus; use focused model-based filenames.

Guide for configuring `__manifest__.py` in Odoo 19 modules.

## Table of Contents
- [Manifest File](#manifest-file)
- [Required Fields](#required-fields)
- [Module Information](#module-information)
- [Dependencies](#dependencies)
- [Data Files](#data-files)
- [Assets](#assets)
- [Hooks](#hooks)
- [External Dependencies](#external-dependencies)
- [Auto-Install](#auto-install)

---

## Manifest File

The manifest file declares a python package as an Odoo module and specifies module metadata.

File: `__manifest__.py`

```python
{
    'name': "A Module",
    'version': '1.0',
    'depends': ['base'],
    'author': "Author Name",
    'category': 'Category',
    'description': """
    Description text
    """,
    'data': [
        'views/my_model_views.xml',
    ],
    'demo': [
        'demo/demo_data.xml',
    ],
}
```

---

## Required Fields

### name (str, required)

The human-readable name of the module.

```python
'name': "My Module",
```

---

## Module Information

### version (str)

Module version, should follow semantic versioning rules.

```python
'version': '1.0.0',
```

### description (str)

Extended description in reStructuredText.

```python
'description': """
This module does something useful.
""",
```

### author (str)

Name of the module author.

```python
'author': "UncleCat",
```

### website (str)

Website URL for the module author.

```python
'website': "https://github.com/unclecat",
```

### license (str, default: LGPL-3)

Distribution license.

Possible values:
- `GPL-2`
- `GPL-2 or any later version`
- `GPL-3`
- `GPL-3 or any later version`
- `AGPL-3`
- `LGPL-3`
- `Other OSI approved licence`
- `OEEL-1` (Odoo Enterprise Edition License v1.0)
- `OPL-1` (Odoo Proprietary License v1.0)
- `Other proprietary`

```python
'license': 'LGPL-3',
```

### category (str, default: Uncategorized)

Classification category within Odoo.

Use existing categories or create hierarchies with `/`:

```python
'category': 'Tools / My Category',
```

### application (bool, default: False)

Whether the module should be considered a fully-fledged application.

```python
'application': True,  # Appears in Apps menu
```

### installable (bool, default: True)

Whether a user can install the module from the Web UI.

```python
'installable': False,  # Hidden from Apps menu
```

### maintainer (str)

Person or entity in charge of maintenance.

```python
'maintainer': "UncleCat",
```

---

## Dependencies

### depends (list(str))

Odoo modules which must be loaded before this one.

```python
'depends': ['base', 'web', 'sale'],
```

**Important**: Module `base` is always installed, but you should still specify it as a dependency to ensure your module is updated when `base` is updated.

When a module is installed, all dependencies are installed first.

---

## Data Files

### data (list(str))

Data files always loaded at installation and update.

```python
'data': [
    'security/my_module_groups.xml',
    'security/my_model_security.xml',
    'security/ir.model.access.csv',
    'data/my_model_data.xml',
    'views/my_model_views.xml',
    'report/my_model_templates.xml',
    'report/my_model_reports.xml',
    'views/my_module_menus.xml',
],
```

### demo (list(str))

Data files only loaded in demonstration mode. Odoo 19 creates new databases **without**
demo data unless the server runs with `--with-demo`.

```python
'demo': [
    'demo/demo_data.xml',
],
```

---

## Assets

### assets (dict)

Definition of how static files are loaded in asset bundles.

```python
'assets': {
    'web.assets_backend': [
        'my_module/static/src/js/my_script.js',
        'my_module/static/src/scss/my_style.scss',
    ],
    'web.assets_frontend': [
        'my_module/static/src/js/frontend.js',
    ],
},
```

---

## Hooks

### {pre_init, post_init, uninstall}_hook (str)

Hooks for module installation/uninstallation.

```python
# In __init__.py
def pre_init_hook(env):
    """Executed prior to module installation"""
    pass

def post_init_hook(env):
    """Executed right after module installation"""
    pass

def uninstall_hook(env):
    """Executed after module uninstallation"""
    pass
```

```python
# In __manifest__.py
'pre_init_hook': 'pre_init_hook',
'post_init_hook': 'post_init_hook',
'uninstall_hook': 'uninstall_hook',
```

**Usage**: Only when setup/cleanup is extremely difficult or impossible through the API.

---

## External Dependencies

### external_dependencies (dict(key=list(str)))

Dictionary of Python and binary dependencies.

```python
'external_dependencies': {
    'python': ['requests', 'openpyxl'],
    'bin': ['zip', 'unzip'],
},
```

The module won't be installed if dependencies are not available.

---

## Auto-Install

### auto_install (bool or list(str), default: False)

If `True`, automatically installs if all dependencies are installed.

Used for "link modules" implementing integration between independent modules.

```python
'auto_install': True,  # Install when all dependencies are present
```

If it is a list, must contain a subset of dependencies:

```python
'auto_install': ['sale', 'crm'],  # Install when both sale and crm are present
```

If the list is empty, always auto-install regardless of dependencies.

```python
'auto_install': [],  # Always install
```

---

## Complete Example

```python
{
    'name': "My Awesome Module",
    'version': '1.0.0',
    'category': 'Tools',
    'summary': 'Does something awesome',
    'description': """
My Awesome Module
=================

This module adds awesome functionality to Odoo.
""",
    'author': "UncleCat",
    'website': "https://github.com/unclecat/my_module",
    'license': 'LGPL-3',
    'depends': ['base', 'web'],
    'data': [
        'security/my_module_groups.xml',
        'security/my_model_security.xml',
        'security/ir.model.access.csv',
        'data/my_model_data.xml',
        'views/my_model_views.xml',
        'report/my_model_templates.xml',
        'report/my_model_reports.xml',
        'views/my_module_menus.xml',
    ],
    'demo': [
        'demo/demo_data.xml',
    ],
    'assets': {
        'web.assets_backend': [
            'my_module/static/src/js/my_widget.js',
            'my_module/static/src/scss/my_style.scss',
        ],
    },
    'external_dependencies': {
        'python': ['requests'],
    },
    'application': True,
    'installable': True,
    'auto_install': False,
}
```

---

## References

- Source: Odoo 19 documentation `/doc/developer/reference/backend/module.rst`
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall