odoo/o-spreadsheet#8533
Created by Ronakkumar Mukeshbhai Bharadiya (rmbh)
- label
- odoo:saas-18.3-fix-unbounded-ranges-rmbh
- head
- 3174308434ead435d2b0dcf4e461a146aa41fba3
| odoo/o-spreadsheet | |
|---|---|
| saas-18.3 | #8533 missing r+ |
| saas-18.4 | |
| 19.0 | |
| saas-19.1 | |
| saas-19.2 | |
| saas-19.3 | |
| master |
[FIX] range: make unbounded zone dynamic
Description:
Unbounded range (e.g., A:A, 2:3) was using a fixed zone computed at createRange. Because of this, they did not adapt to later sheet structure changes.
This regression was introduced in commit 00b2889, where ranges were materialized into bounded zones during creation.
As a result, =SUM(A:A) did not include newly inserted rows, data validations were not applied to new rows, and any logic relying on range.zone used outdated bounds.
The issue comes from storing the zone as a static value instead of deriving it from the current sheet size.
This commit fixes it by computing the zone dynamically on access based on the current sheet size. Unbounded ranges now correctly follow row and column insertions or deletions.
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