Set CRM order status to PACKED after Checkbox accepts the receipt

- ExoCrmClient.set_status: live SetStatus needs {Orders: [id], Status} and
  replies per order, unlike the documented {ID, Status}
- receipts.crm_status_set_at (migration 0006); set right after creation,
  retried by cron, row-locked to avoid a repeat PACKED overwriting a newer status
- CRM errors under capitalized 'Errors' and non-JSON replies are reported

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-24 14:04:26 +03:00
co-authored by Claude Opus 5.5
parent 3a6ad85d11
commit cbf9832e5b
12 changed files with 266 additions and 19 deletions
+1
View File
@@ -36,6 +36,7 @@ class AuditAction(str):
CASH_REGISTER_UPDATED = "cash_register.updated"
RECEIPT_CREATE_REQUESTED = "receipt.create_requested"
RECEIPT_CANCELLED = "receipt.cancelled"
ORDER_CRM_STATUS_SET = "order.crm_status_set"
class AuditLog(UUIDPrimaryKeyMixin, Base):