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] borders: wrong borders on remove rows #4121

Closed
wants to merge 1 commit into from

Conversation

fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented Apr 24, 2024

Description

When removing multiple headers, the borders are not shifted correctly, leading to incorrect borders.

This happens because we modify the borders for each deleted rows separately. But we don't sort the rows before modifying the borders. So we first delete the row 1, then the row 2. But the row 2 is now the row 1, since the old row 1 has been deleted. So we end up with wrong operations.

This is solved by simply sorting the rows in reverse order before modifying the borders.

Task: : 3884112

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: #4119
Forward-Port-Of: #4109

When removing multiple headers, the borders are not shifted
correctly, leading to incorrect borders.

This happens because we modify the borders for each deleted rows
separately. But we don't sort the rows before modifying the borders.
So we first delete the row 1, then the row 2. But the row 2 is now
the row 1, since the old row 1 has been deleted. So we end up with wrong
operations.

This is solved by simply sorting the rows in reverse order before
modifying the borders.

Task: 3884112
X-original-commit: 0dbad31
@robodoo
Copy link
Collaborator

robodoo commented Apr 24, 2024

@fw-bot
Copy link
Collaborator Author

fw-bot commented Apr 24, 2024

This PR targets 17.0 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

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.

None yet

3 participants