Skip to content

Conversation

@hokolomopo
Copy link
Contributor

Description

This commit adds a new tab "Design" in the pivot side panel, allowing users to customize the appearance of pivot tables.

At the moment the panel only allow for the same customization as the arguments of the =PIVOT() function. The user can easily edit those settings in the side panel, and can override them in the formula if needed.

Task: 5150320

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

@robodoo
Copy link
Collaborator

robodoo commented Oct 9, 2025

Pull request status dashboard

@hokolomopo hokolomopo force-pushed the master-pivot-style-panel-adrm branch 2 times, most recently from 9c773a6 to 43e832d Compare October 9, 2025 10:50
Comment on lines +241 to 249
export interface PivotStyle {
numberOfRows?: number;
numberOfColumns?: number;
displayTotals?: boolean;
displayColumnHeaders?: boolean;
displayMeasuresRow?: boolean;
}
Copy link
Contributor Author

@hokolomopo hokolomopo Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having everything optional makes it a bit harder to use, we need to do style.displayTotals ?? DEFAULT_PIVOT_STYLE.displayTotals

  1. It's fine
  2. rename variables so they are falsy by default (eg. hideTotals instead)
  3. make everything mandatory. Need migration + make json/revisions a bit more heavy

note that 2/3 don't solve everything, it only works for boolean values not really for number values (I don't think we want to add Number.MAX_VALUE or w/e in the JSON)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go for 1, it's fine, especially because as you say 2 and 3 are not perfect :)

@hokolomopo hokolomopo force-pushed the master-pivot-style-panel-adrm branch 3 times, most recently from 3425061 to 6452753 Compare October 17, 2025 10:13
This commit adds a new tab "Design" in the pivot side panel, allowing
users to customize the appearance of pivot tables.

At the moment the panel only allow for the same customization as the
arguments of the `=PIVOT()` function. The user can easily edit those
settings in the side panel, and can override them in the formula if
needed.

Task: 5150320
@pro-odoo pro-odoo force-pushed the master-pivot-style-panel-adrm branch from 6452753 to 38b1220 Compare October 20, 2025 06:19
Copy link
Collaborator

@pro-odoo pro-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robodoo r+

Cool :)

Comment on lines +241 to 249
export interface PivotStyle {
numberOfRows?: number;
numberOfColumns?: number;
displayTotals?: boolean;
displayColumnHeaders?: boolean;
displayMeasuresRow?: boolean;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go for 1, it's fine, especially because as you say 2 and 3 are not perfect :)

robodoo pushed a commit that referenced this pull request Oct 20, 2025
This commit adds a new tab "Design" in the pivot side panel, allowing
users to customize the appearance of pivot tables.

At the moment the panel only allow for the same customization as the
arguments of the `=PIVOT()` function. The user can easily edit those
settings in the side panel, and can override them in the formula if
needed.

closes #7286

Task: 5150320
Signed-off-by: Pierre Rousseau (pro) <[email protected]>
@robodoo
Copy link
Collaborator

robodoo commented Oct 20, 2025

@hokolomopo @pro-odoo staging failed: ci/runbot (view more at https://runbot.odoo.com/runbot/batch/2189588/build/91582663)

@pro-odoo
Copy link
Collaborator

robodoo retry

robodoo pushed a commit that referenced this pull request Oct 20, 2025
This commit adds a new tab "Design" in the pivot side panel, allowing
users to customize the appearance of pivot tables.

At the moment the panel only allow for the same customization as the
arguments of the `=PIVOT()` function. The user can easily edit those
settings in the side panel, and can override them in the formula if
needed.

closes #7286

Task: 5150320
Signed-off-by: Pierre Rousseau (pro) <[email protected]>
@robodoo robodoo added the 19.1 label Oct 20, 2025
@robodoo robodoo closed this Oct 20, 2025
@fw-bot fw-bot deleted the master-pivot-style-panel-adrm branch October 27, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants