Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] collaborative: fix undo concurrence issues #5669

Open
wants to merge 1 commit into
base: saas-17.2
Choose a base branch
from

Conversation

fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented Feb 10, 2025

Some revisions undergo transformations that may cause issues with undo/redo if the transformation is destructive (we don't get back the original command by transforming it with the inverse). To prevent these problems, we must discard all subsequent local revisions.

Here is a simple example to illustrate the issue:

  • Alice add some columns before "C"
  • Concurrently, Alice undo her action, Bob resize columns A to E
  • Alice's command is committed before Bob's command => The state is synchronized
  • Alice redo her action

=> The state is not synchronized anymore, as Bob contains in his history the resize command with columns A to E, but Alice has the resize command without the columns that has been removed by the undo.

Co-authored-by: Lucas Lefèvre [email protected]
Co-authored-by: Pierre Rousseau [email protected]

Task: 4558024

Description:

description of this task, what is implemented and why it is implemented that way.

Task: TASK_ID

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

Forward-Port-Of: #5657

Some revisions undergo transformations that may cause issues with
undo/redo if the transformation is destructive (we don't get back the
original command by transforming it with the inverse). To prevent these
problems, we must discard all subsequent local revisions.

Here is a simple example to illustrate the issue:
- Alice add some columns before "C"
- Concurrently, Alice undo her action, Bob resize columns A to E
- Alice's command is committed before Bob's command
=> The state is synchronized
- Alice redo her action

=> The state is not synchronized anymore, as Bob contains in his history
the resize command with columns A to E, but Alice has the resize command
without the columns that has been removed by the undo.

Task: 4558024
X-original-commit: 6d69933
Co-authored-by: Lucas Lefèvre <[email protected]>
Co-authored-by: Pierre Rousseau <[email protected]>
@robodoo
Copy link
Collaborator

robodoo commented Feb 10, 2025

Pull request status dashboard

@fw-bot
Copy link
Collaborator Author

fw-bot commented Feb 10, 2025

This PR targets saas-17.2 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo
Copy link
Collaborator

robodoo commented Feb 10, 2025

@pro-odoo @rrahir the target branch 'saas-17.2' has been disabled, you may want to close this PR.

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

Successfully merging this pull request may close these issues.

3 participants