← ClaudeAtlas

odoo-datalisted

Shipping data with an Odoo module — XML/CSV data files, seeded records, ir.sequence numbering, and configuration via res.config.settings / ir.config_parameter. Use whenever adding records to data/ or demo/, writing <record>/<field> XML, wiring external IDs (ref/eval/command tuples), setting noupdate, ordering the __manifest__ data list, generating document numbers, or chasing "my edit reverts on -u" / "duplicate seeded record" bugs. Don't guess what's already seeded or whether a record is protected — read ground truth from ir.model.data via odoo-introspect's metadata script first.
tuanle96/odoo-ai-skills · ★ 4 · Data & Documents · score 62
Install: claude install-skill tuanle96/odoo-ai-skills
# Odoo data, sequences & configuration Data files are code: records load on `-i` and, unless protected, are **re-asserted from XML on every `-u`**. Two failures dominate — a seeded record's manual edits silently vanish on the next upgrade, or you create a second copy of a record the base already ships. Both come from guessing what exists and how it's flagged. **The rule: before adding or editing shipped data, read what's already seeded and its `noupdate` flag from `ir.model.data` — don't guess.** Targets Odoo 17/18, through Odoo 19 (current LTS). For older versions check `skills/odoo-introspect/references/version-matrix.md`. ## Discover first (introspect, don't grep) Run `odoo-introspect`'s scripts against the live DB before touching data: ```bash # metadata — seeded external IDs for a model: owning module, xmlid, and noupdate. # noupdate_records (noupdate=True) are protected from -u: UI edits stick, # but later XML edits won't apply — change them with a migration. MODEL=res.partner odoo-bin shell -d <DB> --no-http < scripts/metadata.py # model_brief — field names/types, so record <field name> values aren't guessed. MODEL=res.partner odoo-bin shell -d <DB> --no-http < scripts/model_brief.py ``` If `metadata.py` lists `module.xmlid` for what you're about to add, **reuse it with `ref()`** instead of creating a duplicate. ## data/ vs demo/ — when each loads | Folder / manifest key | Loads on | Loaded on `-u` | Use for | |---|---|---|---| | `data` | e