Skip to content

[18.0][ADD] global_undo: undo/redo backend ops with Ctrl+Z - #3686

Open
polqubiq wants to merge 1 commit into
OCA:18.0from
polqubiq:18.0-add-global_undo
Open

[18.0][ADD] global_undo: undo/redo backend ops with Ctrl+Z#3686
polqubiq wants to merge 1 commit into
OCA:18.0from
polqubiq:18.0-add-global_undo

Conversation

@polqubiq

Copy link
Copy Markdown
Contributor

Why

You save a wrong change, confirm an order, post an invoice, or delete a record — and there is no Ctrl+Z. Cancel/draft flows, manual fixes, or a restore are the only options. Odoo has no general undo for backend work.

What it does

  • Records create / write / unlink and reversible actions (confirm SO/PO, post invoice) as one step per form save.
  • Ctrl+Z / Ctrl+Shift+Z and a systray (undo, redo, last 10 steps). Inside inputs, Ctrl+Z stays native.
  • History + trash under Settings → Global Undo. Unsafe undos are refused, not forced.

Limits

Skips technical models, ledger rows, mass ops, sudo and non-web-client writes. Does not reverse mail/APIs. Respects accounting integrity.

@polqubiq polqubiq changed the title [ADD] global_undo: undo/redo backend ops with Ctrl+Z [18.0][ADD] global_undo: undo/redo backend ops with Ctrl+Z Jul 27, 2026
@polqubiq
polqubiq force-pushed the 18.0-add-global_undo branch 3 times, most recently from ff61f43 to 0472a0c Compare July 27, 2026 10:18
Journal user CRUD and reversible business actions so they can be
undone/redone from the systray, with history and a recoverable trash.
@polqubiq
polqubiq force-pushed the 18.0-add-global_undo branch from 0472a0c to f52ceec Compare July 27, 2026 10:35
@polqubiq

Copy link
Copy Markdown
Contributor Author

Hi @pedrobaeza I've just submitted a PR that I think could be very useful and provide a lot of value to the community.
It's a feature we've really been missing, and we're surprised Odoo still doesn't include it out of the box.

@pedrobaeza pedrobaeza added this to the 18.0 milestone Jul 27, 2026
@pedrobaeza

Copy link
Copy Markdown
Member

Hi @polqubiq although it seems a very interesting thing, I think it's very risky, as unless you control and program the whole possible actions to undo/redo, you will get unexpected results installing this partially in your instance. It's the same as mass_editing (now called server_action_mass_edit). It can provoke inconsistent data, and I tend to avoid its usage. It may be also counterproductive for UX experience, as current business flows with explicit "Cancel" or "Reset to draft" buttons make aware the user of what's happening.

Anyway, this can be useful for some, or serve as inspiration for a core feature, so it's always welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants