Replicate action
Introduction
Section titled “Introduction”ReplicateAction copies a record into a new one. Defaults: name replicate, label Replicate, plus icon, gray color.
from almasix.orbit.actions import ReplicateAction
ReplicateAction.make() .exclude_attributes(["slug", "published_at"]) .using(lambda replica, **_: Post.create(**replica)) .success_notification("Replicated")

Exclude attributes
Section titled “Exclude attributes”.exclude_attributes([...]) drops keys from the default replica (always excludes id). Works on dict records and simple objects with __dict__.
from almasix.orbit.actions import ReplicateAction
ReplicateAction.make().exclude_attributes(["slug", "views", "published_at"])Custom replica
Section titled “Custom replica”.replicate_using(callback) replaces the default attribute copy. The callback receives the source record and must return the replica payload (dict or model — your .using / .action decides).
from almasix.orbit.actions import ReplicateAction
ReplicateAction.make().replicate_using( lambda record, **_: {**record, "title": f"{record['title']} (copy)", "status": "draft"})Replica lifecycle
Section titled “Replica lifecycle”Order inside .call(record=...):
.before- Build replica (
.replicate_usingor default) .before_replica_saved.using/.action(kwargs includerecord+replica).after_replica_saved.after
from almasix.orbit.actions import ReplicateAction
ReplicateAction.make() .before_replica_saved(lambda replica, **_: replica.update({"slug": unique_slug()})) .using(lambda replica, **_: Post.create(**replica)) .after_replica_saved(lambda replica, **_: attach_default_tags(replica))Halt / cancel from any hook stops the remaining chain.