odoo/o-spreadsheet#6951

Created by fw-bot
Merged at e50d7ddf8d637ae863fde4d677093a581d439b6d

Statuses:

label
odoo:saas-18.2-18.0-fix-table-move-columns-rows-dhrp-457446-fw
head
4d7f03eacee82c3f9a054258a8165d2a41d3c444
merged
3 weeks ago by BI, Dhrutik Patel (dhrp)
odoo/o-spreadsheet
18.0 #6760
saas-18.1 #6950
saas-18.2 #6951
saas-18.3 #6952
saas-18.4 #6954
master #6955

[FIX] selection: prevent partial move of table rows with headers

Description:

Steps to reproduce

  • Create a table with headers
  • Select some rows including the header row, but not the whole table
  • Try to move the selected rows

Current behavior

The move is allowed even when only part of the table (including headers) is selected.
This results in broken table structure or orphaned headers.

Desired behavior after PR is merged

Row moves are allowed only if:

  • The headers are not included in the selection, or
  • The entire table (including headers) is selected.

Task: 4862731

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