Skip to content

[FIX] range: correctly handle unbounded ranges on row/col changes#8753

Closed
fw-bot wants to merge 1 commit into
saas-19.1from
saas-19.1-saas-18.3-fix-unbounded-ranges-rmbh-528205-fw
Closed

[FIX] range: correctly handle unbounded ranges on row/col changes#8753
fw-bot wants to merge 1 commit into
saas-19.1from
saas-19.1-saas-18.3-fix-unbounded-ranges-rmbh-528205-fw

Conversation

@fw-bot
Copy link
Copy Markdown
Collaborator

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

Description:

Steps to reproduce:

  • Create a sheet with 3 rows
  • Set A1 = 1, A2 = 2, and C1 = SUM(A:A)
  • Delete row 3
  • Add a new row at the bottom
  • Set A3 = 6

Issue:

  • Unbounded ranges (e.g. A:A) are not properly updated on row/col changes.
    The changeType can be incorrectly computed as NONE or MOVE instead
    of RESIZE, causing formulas to miss newly added cells (e.g. A3 in SUM).

Cause:

  • Incomplete condition handling for unbounded ranges caused inconsistent
    changeType detection across different scenarios.

Fix:

  • Refine changeType computation for unbounded ranges by covering all edge
    cases and ensuring correct RESIZE behavior when the range should expand.

Task: 6167358

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: #8533

Steps to reproduce:
- Create a sheet with 3 rows
- Set `A1 = 1`, `A2 = 2`, and `C1 = SUM(A:A)`
- Delete row 3
- Add a new row at the bottom
- Set `A3 = 6`

Issue:
- Unbounded ranges (e.g. `A:A`) are not properly updated on row/col changes.
  The changeType can be incorrectly computed as `NONE` or `MOVE` instead
  of `RESIZE`, causing formulas to miss newly added cells (e.g. `A3` in `SUM`).

Cause:
- Incomplete condition handling for unbounded ranges caused inconsistent
  changeType detection across different scenarios.

Fix:
- Refine changeType computation for unbounded ranges by covering all edge
  cases and ensuring correct `RESIZE` behavior when the range should expand.

Task: 6167358
X-original-commit: ae0a2d6
@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented May 20, 2026

Pull request status dashboard

@fw-bot
Copy link
Copy Markdown
Collaborator Author

fw-bot commented May 20, 2026

This PR targets saas-19.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, 2026
Steps to reproduce:
- Create a sheet with 3 rows
- Set `A1 = 1`, `A2 = 2`, and `C1 = SUM(A:A)`
- Delete row 3
- Add a new row at the bottom
- Set `A3 = 6`

Issue:
- Unbounded ranges (e.g. `A:A`) are not properly updated on row/col changes.
  The changeType can be incorrectly computed as `NONE` or `MOVE` instead
  of `RESIZE`, causing formulas to miss newly added cells (e.g. `A3` in `SUM`).

Cause:
- Incomplete condition handling for unbounded ranges caused inconsistent
  changeType detection across different scenarios.

Fix:
- Refine changeType computation for unbounded ranges by covering all edge
  cases and ensuring correct `RESIZE` behavior when the range should expand.

closes #8753

Task: 6167358
X-original-commit: ae0a2d6
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Ronakkumar Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com>
@robodoo robodoo closed this May 20, 2026
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