Skip to content

SerialOutboxEntry

Outbox entry for a pending serial lifecycle operation.

Attributes:
outbox_id: Stable UUID — safe for dedup on retries.
operation: The serial operation to perform (serial_receipt | serial_issue | serial_transfer).
payload_json: JSON-serialised serial lifecycle arguments.
status: Current lifecycle state.
retry_count: Number of failed relay attempts.
error: Last error message (if any).
created_at: When this entry was created.
processed_at: When the relay processed the entry.
reference_id: Source ``StockEntry.entry_no``.

Source: doctype.py

Field Type Required Description Validators
outbox_id str Unique outbox entry ID (UUID) -
operation str Operation: serial_receipt serial_issue
payload_json str JSON-serialised serial lifecycle args -
status str Lifecycle state: Pending Sent
retry_count int Number of failed relay attempts -
error None Last error message -
created_at datetime UTC timestamp when the entry was created -
processed_at None UTC timestamp when the relay processed the entry -
reference_id str Source StockEntry.entry_no -
Role Create Delete Read Write
All
Setting Value
Submittable False
Track Changes True

Controller hooks are implemented in *_controller.py files. Available lifecycle hooks:

  • validate() - Called before save, raise exceptions for validation errors
  • before_insert() - Called before inserting a new document
  • after_insert() - Called after successfully inserting
  • before_save() - Called before saving (insert or update)
  • after_save() - Called after saving
  • before_delete() - Called before deleting
  • after_delete() - Called after deleting