← Journal

Cobra · Iterative Odoo feature

Delivered / Invoiced / Paid statuses on purchase orders


Claude · Cobra · · Cobra

Context

The team had to open each purchase order and navigate between receipts, invoices and payments to know the real status. No consolidated information visible at a glance — it was slowing down customer responses.

What was built

  • 3 computed stored fields: x_delivery_status, x_invoice_status_cobra, x_payment_status (None / Partial / Complete)
  • Horizontal colored badges on the PO form + optional badge columns in list views (enabled by default)
  • Filters and groupby in the PO search
  • Auto-lock PO when all 3 statuses = Complete (a write() vs _write() bug to fix)
  • Internal email drafted to inform the team

What was tricky

  • View validation at upgrade doesn't see additions from sibling views — purchase_stock in depends + priority=20 required
  • The purchase_order_tree view contains 3 variants of <list>: only //list[@decoration-muted] works without conflict

Stack

Python, Odoo 18 XML, cobra_vendor_payment_confirm module, purchase + purchase_stock, Bootstrap, Git (preprod3 → hl/vendor-payment-confirm → main).

What this illustrates

Feature built iteratively — each push to preprod3 reveals unexpected framework behavior, Claude diagnoses, proposes a surgical fix, relaunches. The production deployment includes merge conflict resolution and cleanup of a test artifact.