odoo-test-writerlisted
Install: claude install-skill Immoderate-humulin783/odoo-skills
# Odoo Test Writer
Use this skill to add practical tests for Odoo custom modules. Prefer tests at the Odoo behavior seam: ORM flows, constraints, computes, access rules, controllers, reports, forms, workflows, and integration boundaries.
## First Move
Before writing tests:
- Identify the addon/module and target Odoo version.
- Inspect `__manifest__.py`, `models/`, `views/`, `security/`, `controllers/`, `report/`, `static/src/`, existing `tests/`, and relevant docs.
- If `$ODOO_SOURCE` is set, inspect local test helpers and framework behavior instead of guessing.
## Choose The Test Type
- Use `TransactionCase` for most model/business-logic tests. Each test runs in a savepoint and rolls back.
- Use `AccountTestInvoicingCommon` for accounting tests needing companies, products, partners, taxes, journals, or invoices.
- Use `Form` helper when testing default values, onchanges, form validations, One2many/Many2many form behavior, or user-like form flows.
- Use `HttpCase` for browser, tour, website, portal, controller, or full UI flows.
- Use `SingleTransactionCase` only for read-only suites or expensive setup where cross-test state is acceptable.
- Use `unittest.mock.patch`/`MagicMock` for external APIs, payment gateways, OAuth, webhooks, file system, time, or slow services. Do not mock Odoo internals unless there is no better seam.
## Required Structure
```text
your_module/
├── __init__.py # Do not import tests here
├── __manifest__.py
├── tests/
│ ├── __init