2026-05-04 on prod. Closes the deferred half of R5: when an operator
edits a pos.order in Odoo backoffice (refund, cancel,
customer attach), the every-15-min reverse-sync worker pulls the
change back into cafe.orders so the Cafe ledger doesn't
drift away from the financial source of truth.
Order 00123-4949-357252, rang 2026-04-18) had been cancelled in Odoo backoffice but cafe.orders still showed it as paid. Reverse sync flipped it to refunded / refund_reason='Cancelled in Odoo' / refunded_at=2026-04-18T15:54:20Z. Working as designed — exactly the kind of silent drift R5.7 was built to catch.refunded_order_id points at the original; flip to refunded + stamp odoo_refund_synced_at so the forward worker doesn't try to push our own. (b) Cancel-in-Odoo — state='cancel' → cafe refunded. (c) Customer attach/change — update customerName + odooPartnerId.odoo_reverse_sync_watermark column; advances to MAX(write_date) of the batch on success. NULL = first run; bounded by the join on odoo_order_id against cafe.orders + limit=500 per fetch.*/15 * * * * on the existing nix-cafe-cron-trigger Worker. Joins forward-sync (* * * * *), daily report (15:00 UTC), and R2 GC (18:30 UTC).