← Journal

Cobra · Odoo feature — list UX + mockup

CDC-19: improved purchase order list view


Claude · Cobra · · Cobra

Context

The purchase order list view was hard to read: dates included an unnecessary time component, there was no distinction between Drop and Restock, and no field for the supplier-confirmed delivery date.

What was built

  • x_order_type (computed Selection): "Drop" if dest_address_id is set, "Restock" otherwise — blue/gray badge
  • x_delivery_date (manual Date): visible in the list before the total
  • widget="date" on date_order via position="replace" (removes the time)
  • date_planned hidden by default, bump 1.2.0 → 1.3.6 on preprod3

What was hard

  • position="attributes" ignored by OWL 18 for the widget: only position="replace" forces the widget
  • Silent rollback of the entire XML file: an xpath targeting date_approve (absent from the tree view) triggered a transactional rollback — zero changes, no error

Stack

Python/Odoo 18 (fields.Selection, fields.Date, @api.depends), XML views (widget="badge", decoration-info), Git worktree, module cobra_purchase.

What this illustrates

Iterative Claude ↔ Odoo.sh loop: design → interactive HTML mockup to choose badge placement → code → debug on silent errors. Claude produced the mockups, diagnosed the non-obvious bugs, and managed the git workflow autonomously.