Cobra · Layered post-prod debugging
CDC-18 stabilisation: dashboard filters, menus, fr_FR translations
Context
The CDC-18 purchasing dashboard (live on May 24) had two problems: the buttons weren't activating the search filters, and renamed menus were still showing old FR names after the upgrade.
What was built
- Odoo 18 invisible filter fix:
getSearchItems()excludesinvisible="1"filters — replaced with direct access tosearchModel.searchItems, pattern documented - XML domain fix: removed
('picking_type_id','!=',False)(0 results);ilike 'Cobra'→not ilike 'Dropship' - Immediate prod fix:
ir.ui.menu.write()withlang=fr_FRvia XML-RPC - Permanent fix: 4 entries added to
cobra_purchase/i18n/fr.po - Bump 1.3.3 → 1.3.4; CLAUDE.md trap #8 +
odoo18_menu_rename_translations.mdmemory
What was hard
- fr_FR translation trap: the XML-RPC API without a language context returned the correct names → false lead of "browser cache" for several exchanges. Private browsing forced the real diagnosis (separate translation layer, invisible without
context={"lang":"fr_FR"}) getSearchItems()silent failure: no error, successful call, empty array — undiagnosable without knowing Odoo 18 internals
Stack
OWL 2, XML-RPC Python, XML views Odoo 18 Enterprise, PO/gettext (i18n), Git worktrees.
What this illustrates
Layered debugging with methodical elimination of hypotheses (cache → neutral API → API with lang → separate translation layer), immediate prod fix without shell access, then permanent fix. Cross-session memory has real value.