-
Notifications
You must be signed in to change notification settings - Fork 31
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] Misc move headers fixes #3283
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the arguments of the commands `MOVE_COLUMNS_ROWS`, specifically `base` is supposed to be a HeaderIndex. The command however was not properly designed: it would always move the `target` headers **before** `base`. This is a problem when we want to move a col (resp. row) header to the far right (resp. bottom) of the sheet. E.g. On a sheet with 5 col headers, if we wanted to move the first one them to the extreme right of the sheet, we would have to specify a command where the target should be `[0]` and the base would be `5` because we want the target to go after `4`, which is quasi equivalent except that header `5` does not exist! This revision changes the command payload so that we can specify whether we want to place our target before or after the base, allowing to check that both `elements` and `base` contain valid (existing) headers. Task: 3603714 X-original-commit: 54940ad
The command could be called with invalid (i;e. out of bounds) headers. X-original-commit: 59625c4
the condition on the argument `base` was not strict enough, it could refer to a header index just outside of the existing headers pool and unfortunately, the tests did not test that edge-case. Task: 3603714 X-original-commit: e4fbb5e
This PR targets saas-16.3 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 r+ |
robodoo
pushed a commit
that referenced
this pull request
Nov 28, 2023
the arguments of the commands `MOVE_COLUMNS_ROWS`, specifically `base` is supposed to be a HeaderIndex. The command however was not properly designed: it would always move the `target` headers **before** `base`. This is a problem when we want to move a col (resp. row) header to the far right (resp. bottom) of the sheet. E.g. On a sheet with 5 col headers, if we wanted to move the first one them to the extreme right of the sheet, we would have to specify a command where the target should be `[0]` and the base would be `5` because we want the target to go after `4`, which is quasi equivalent except that header `5` does not exist! This revision changes the command payload so that we can specify whether we want to place our target before or after the base, allowing to check that both `elements` and `base` contain valid (existing) headers. Task: 3603714 X-original-commit: 54940ad Part-of: #3283
robodoo
pushed a commit
that referenced
this pull request
Nov 28, 2023
the condition on the argument `base` was not strict enough, it could refer to a header index just outside of the existing headers pool and unfortunately, the tests did not test that edge-case. closes #3283 Task: 3603714 X-original-commit: e4fbb5e Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com> Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MOVE_COLUMNS_ROWS
payloadMOVE_COLUMNS_ROWS
ADD_COLUMNS_ROWS
allowDispatchDescription:
description of this task, what is implemented and why it is implemented that way.
Task: : 3603714
review checklist
Forward-Port-Of: #3275
Forward-Port-Of: #3228