Skip to content

task#31940 Reusable sales history pivot and a panel that fits its table - #26

Merged
alan196 merged 2 commits into
Jarsa:19.0from
Jarsa-dev:19.0-task-32050
Aug 28, 2026
Merged

alan196 merged 2 commits into
Jarsa:19.0from
Jarsa-dev:19.0-task-32050

Conversation

@alan196

@alan196 alan196 commented Aug 21, 2026

Copy link
Copy Markdown

What

  • The pivot that feeds the purchase_sales_history widget moves to product.product._get_sales_history_pivot(). The shape of the Json is the contract of the widget, so any model showing the panel now reuses it instead of assembling the same table again. purchase.order keeps behaving exactly as before.
  • The panel takes the width of its own table. The fixed 480px cut the last months off and forced an inner horizontal scroll, so the twelve columns plus the totals never fitted.
  • The zebra rows relied on darken(), which turns muddy on the dark theme, and the heat map hardcoded a colour that barely showed there. Structure is now carried by the frozen row and column, and the cell only states its intensity so the stylesheet mixes the accent for whichever theme is on.

Why

mafensa_purchase shows the same panel on its requirements screen, where the buyer decides the quantity to order. Duplicating the pivot there would have meant two implementations of one widget contract.

Testing

purchase_line_sale_history tests pass on a clean database (10 tests).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FsSJPY85JV7KD6Q6qddG83

alan196 and others added 2 commits August 21, 2026 11:14
…oduct

The pivot shape is the contract of the field widget, so any model that wants
the panel can now reuse it instead of assembling the same table again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsSJPY85JV7KD6Q6qddG83
…he panel

The fixed 480px cut the last months off and forced an inner horizontal
scroll, so the twelve columns plus the totals never fit. The panel now takes
the width of its own table.

The zebra rows relied on darken(), which turns muddy on the dark theme, and
the heat map hardcoded a colour that barely showed there. Structure is now
carried by the frozen row and column, and the cell only states its intensity
so the stylesheet mixes the accent for whichever theme is on.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsSJPY85JV7KD6Q6qddG83
@jarsabot

Copy link
Copy Markdown

Linked to Odoo task #31940

@alan196
alan196 merged commit 2a17e68 into Jarsa:19.0 Aug 28, 2026
1 of 4 checks passed
@alan196
alan196 deleted the 19.0-task-32050 branch August 28, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants