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] edition: do not reset selection when range selecting on differe… #1370

Conversation

fw-bot
Copy link
Collaborator

@fw-bot fw-bot commented May 20, 2022

…nt sheet

When starting a ranger selection in the composer, we would
systematically reset the selection anchor to the cell that we were
editing in the first place. This behaviour is required when a user edits
a formula and wants to select some ranges by moving the position with
their keyboard.

e.g. User wants to sum several range together -
they start editing cell A1
select a first cell anywhere on the grid,
input a comma to add another zone,
hit ArrowDown,
it should select A2.

Unfortunately, when selecting a range on another sheet, this behaviour
does not make sense anymore since there is no guarantee that the anchor
coordinates of the edited cell existes on another sheet.

e.g. Edit on A1000 sheet 1 with 1000 rows, then move to sheet 2 with 10
rows, When selecting several ranges for a formula, you cannot be 'moved'
to A1000 since it doesn't exist.

To solve this, we choose to prevent the reset of the anchor when the
current sheet differs from the sheet of the edited cell.

task 2859417

Description:

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

Odoo task ID : 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 (_lt("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: #1369

…nt sheet

When starting a ranger selection in the composer, we would
systematically reset the selection anchor to the cell that we were
editing in the first place. This behaviour is required when a user edits
a formula and wants to select some ranges by moving the position with
their keyboard.

e.g. User wants to sum several range together -
they start editing  cell A1
select a first cell anywhere on the grid,
input a comma to add another zone,
hit ArrowDown,
it should select A2.

Unfortunately, when selecting a range on another sheet, this behaviour
does not make sense anymore since there is no guarantee that the anchor
coordinates of the edited cell existes on another sheet.

e.g. Edit on A1000  sheet 1 with 1000 rows, then move to sheet 2 with 10
rows, When selecting several ranges for a formula, you cannot be 'moved'
to A1000 since it doesn't exist.

To solve this, we choose to prevent the reset of the anchor when the
current sheet differs from the sheet of the edited cell.

task 2859417

X-original-commit: cdd61a0
@robodoo
Copy link
Collaborator

robodoo commented May 20, 2022

@fw-bot
Copy link
Collaborator Author

fw-bot commented May 20, 2022

This PR targets saas-15.1 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 pushed a commit that referenced this pull request May 20, 2022
…nt sheet

When starting a ranger selection in the composer, we would
systematically reset the selection anchor to the cell that we were
editing in the first place. This behaviour is required when a user edits
a formula and wants to select some ranges by moving the position with
their keyboard.

e.g. User wants to sum several range together -
they start editing  cell A1
select a first cell anywhere on the grid,
input a comma to add another zone,
hit ArrowDown,
it should select A2.

Unfortunately, when selecting a range on another sheet, this behaviour
does not make sense anymore since there is no guarantee that the anchor
coordinates of the edited cell existes on another sheet.

e.g. Edit on A1000  sheet 1 with 1000 rows, then move to sheet 2 with 10
rows, When selecting several ranges for a formula, you cannot be 'moved'
to A1000 since it doesn't exist.

To solve this, we choose to prevent the reset of the anchor when the
current sheet differs from the sheet of the edited cell.

task 2859417

closes #1370

X-original-commit: cdd61a0
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
@robodoo robodoo closed this May 20, 2022
@robodoo robodoo temporarily deployed to merge May 20, 2022 09:35 Inactive
@fw-bot fw-bot deleted the saas-15.1-15.0-fix-cell-reset-on-composition-rar-hWDZ-fw branch June 3, 2022 09:46
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