Found in the first sales-order test on the live ERPNext (the staging mock
renders no Jinja and takes any date):
- Frappe renders webhook bodies with only {doc: <dict>, utils}: doc.items
is the dict's items() method, so the sales-order webhook failed before
it was sent; the overdue template used frappe.utils, which is not there.
Now doc["items"] and utils.date_diff; checked by rendering all four
on the live ERPNext against the submitted order.
- erpsetup updates an existing webhook whose body or condition differs
(in place; dry run reports "would update").
- Usage Record occurred_at is sent as "YYYY-MM-DD HH:MM:SS" in
Europe/Berlin; MariaDB refused RFC 3339, so usage records have not
reached ERPNext since go-live (the outbox kept retrying).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB