odoo/o-spreadsheet#4077
Created by BI, Adrien Minne (adrm)
Closed
- label
- odoo:master-batch-commands-adrm
- head
- d6aca5883fa24d30a275f2e44f038f6059916656
| odoo/o-spreadsheet | |
|---|---|
| master | #4077 |
[IMP] model: allow to batch commands in one history step
[IMP] model: allow to batch commands in one history step
We sometime need to create a UI plugin specifically to handle a command
so that its sub-commands are batched in a single history step.
This is kind of a problem when working with stores, because then we
need both a store to handle all the business logic, and a plugin that
handle a command created specifically to batch sub-commands (looking
at you find & replace).
We can fix that easily by creating a local command BATCH_COMMANDS
that take a callback as argument, and that batches every command
and sub-command executed in the callback within one history step.
[IMP] f&r: remove find & replace plugin
Now that we can batch commands, the plugin find & replace
is now useless.
Task: 3870119
review checklist
- [ ] feature is organized in plugin, or UI components
- [ ] support of duplicate sheet (deep copy)
- [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
- [ ] in model/UI: ranges are strings (to show the user)
- [ ] undo-able commands (uses this.history.update)
- [ ] multiuser-able commands (has inverse commands and transformations where needed)
- [ ] new/updated/removed commands are documented
- [ ] exportable in excel
- [ ] translations (_t("qmsdf %s", abc))
- [ ] unit tested
- [ ] clean commented code
- [ ] track breaking changes
- [ ] doc is rebuild (npm run doc)
- [ ] status is correct in Odoo