Delete action
Introduction
Section titled “Introduction”DeleteAction permanently removes a record after confirmation. Defaults: name delete, label Delete, trash icon, danger color, confirmation on.
from almasix.orbit.actions import DeleteAction
DeleteAction.make() .action(lambda record, **_: delete_post(record))

Default modal copy:
- Heading: Delete?
- Description: This permanently removes the record.
Override with .modal_heading / .modal_description / .modal_submit_action_label.
Without confirmation
Section titled “Without confirmation”Only when you truly need an immediate delete (rare):
from almasix.orbit.actions import DeleteAction
DeleteAction.make().without_confirmation()Danger actions otherwise always confirm — Conduit-safe.
Bulk delete
Section titled “Bulk delete”DeleteBulkAction targets the selected set. Defaults: name delete_bulk, label Delete selected, same danger + confirmation pattern.
from almasix.orbit.actions import DeleteBulkAction
table.bulk_actions([ DeleteBulkAction.make() .chunk_selected_records(100) .authorize_individual_records() .action(lambda records, **_: delete_many(records)),])Bulk helpers on BulkAction:
| Method | Role |
|---|---|
.chunk_selected_records |
Process in batches |
.fetch_selected_records |
Host should hydrate models (default True) |
.authorize_individual_records |
Per-row authorize before delete |
Lifecycle
Section titled “Lifecycle”from almasix.orbit.actions import DeleteAction
DeleteAction.make() .before(lambda record, action, **_: action.halt() if record.get("locked") else None) .using(lambda record, **_: hard_delete(record)) .after(lambda record, **_: log_audit("deleted", record)) .success_notification("Deleted")