task#31940 Reusable sales history pivot and a panel that fits its table - #26
Merged
Merged
Conversation
…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
|
Linked to Odoo task #31940 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
purchase_sales_historywidget moves toproduct.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.orderkeeps behaving exactly as before.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_purchaseshows 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_historytests pass on a clean database (10 tests).🤖 Generated with Claude Code
https://claude.ai/code/session_01FsSJPY85JV7KD6Q6qddG83