Skip to content

[ADD] web_pivot_merge_rows: Add interactive row merge to Pivot views#3508

Open
trisdoan wants to merge 1 commit intoOCA:19.0from
trisdoan:add-web-pivot-merge-rows
Open

[ADD] web_pivot_merge_rows: Add interactive row merge to Pivot views#3508
trisdoan wants to merge 1 commit intoOCA:19.0from
trisdoan:add-web-pivot-merge-rows

Conversation

@trisdoan
Copy link
Copy Markdown
Contributor

@trisdoan trisdoan commented Apr 13, 2026

Summary

  • Adds new module web_pivot_merge_rows that patches PivotRenderer to allow
    interactive row merging in Pivot views
  • Hovering a row header reveals a "+" button that fuses the row with the one
    immediately below, summing all measurements and composing a combined title
    (e.g. "A + B + C")
  • A "×" button on the merged row header splits it back to the original rows
  • Same-indent guard prevents nonsensical parent+child merges
  • State is session-only — resets on navigation, filter change, or reload
  • Pure frontend module: no new models, ACLs, or database changes

Technical approach

  • PivotRenderer patched via patch()PivotModel data is untouched
  • mergeState (useState) maps primary row index → absorbed row indices
  • getRows() applies merge state to produce a synthetic display row list
  • web.PivotRenderer <tbody> loop redirected to this.getRows() via t-xpath
  • Merge/unmerge buttons injected into web.PivotHeader.title via t-xpath
screenrecording-2026-04-13_15-58-25.mp4

@trisdoan trisdoan marked this pull request as ready for review April 13, 2026 09:23
@trisdoan trisdoan marked this pull request as draft April 13, 2026 09:28
@trisdoan trisdoan force-pushed the add-web-pivot-merge-rows branch from f326329 to 560bd02 Compare April 22, 2026 04:53
@OCA-git-bot OCA-git-bot added series:19.0 mod:web_pivot_merge_rows Module web_pivot_merge_rows labels Apr 22, 2026
@trisdoan trisdoan marked this pull request as ready for review April 22, 2026 04:54
A "+" button (visible on hover) fuses a row with the one below, summing
measurements and composing a combined title (e.g. "A + B"). A "×"
button on the merged row splits it back. State is session-only.
@trisdoan trisdoan force-pushed the add-web-pivot-merge-rows branch from 560bd02 to 24c8594 Compare April 22, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:web_pivot_merge_rows Module web_pivot_merge_rows series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants