Repository navigation
Conversation
Bar, line, pie and combined (bars and lines) charts of the KPIs of a report instance, above the table in the preview and dashboards, in the PDF export (drawn as SVG) and in the Excel export (native chart). Assisted-by: Claude Code
Member
Author
|
cc @sbidoul |
Member
|
Pretty! Can you move this PR to oca/mis-builder-contrib, though? |
Member
Author
|
Moved to OCA/mis-builder-contrib#83, closing this one. |
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.
Summary
New module that draws a MIS report instance as a chart: bar, line, pie, or bars
combined with lines (e.g. cash in and out as bars, balance as a line). The chart is
shown above the table in the preview and in dashboards, and is also added to the
PDF and Excel exports.
Settings, Widget tab of the instance: Chart Type, Chart KPIs (empty means all)
and KPIs as Lines. Pie charts show the last column. Account detail rows and
hidden rows are not plotted.
mis_builder is not changed, and the report is not computed again for the screen
and the PDF.
Evidence
Before: the instance shows only the table.
After: Cash Flow report of mis_builder_cash_flow, flows as bars and balance
as a line.
Preview:

PDF:

Tests:
test_chart_bar: one series per KPI, text KPI becomes a gap, KPI drawn as linetest_chart_pie_selected_kpis: slices are the selected KPIs of the last columntest_no_chart: nochartkey without a chart typetest_exports: the PDF contains the SVG, the XLSX contains a chartMerge Danger
Door: two-way
New optional module, no change in mis_builder.
Blast Radius: small
Only instances with a chart type are affected. Known limitation: the Excel export
computes the report twice, because
_generate_xlsx_one_reportdoes not expose thematrix; a small hook in mis_builder would avoid it.