Skip to content

[18.0][ADD] spreadsheet_mis_builder - #1

Closed
mileo wants to merge 1 commit into
18.0from
18.0-add-spreadsheet_mis_builder
Closed

mileo wants to merge 1 commit into
18.0from
18.0-add-spreadsheet_mis_builder

Conversation

@mileo

@mileo mileo commented Nov 18, 2026

Copy link
Copy Markdown
Member

New module bridging MIS Builder and spreadsheet_oca. I could not find any previous attempt in the PRs or issues of both repositories.

What it does

  • A MIS.KPI spreadsheet function returns the value of a KPI of a MIS report template over any period:

    MIS.KPI(report, kpi, date_from, [date_to], [company_ids], [include_unposted], [subkpi])

    When date_to is empty, date_from can be a whole period ("2026", "Q1/2026", "03/2026").

  • A Spreadsheet button on MIS report instances (form and preview) creates a spreadsheet reproducing the report, where every KPI cell is a live formula.

MIS report with the Spreadsheet button

Spreadsheet created from the MIS report

Design

  • The data source is the report template (mis.report), not the instance. Report, companies, posted/unposted and base date are plain cells, so the spreadsheet no longer depends on the instance it was created from.
  • Relative periods are exported as formulas on the base date cell. Changing it moves the whole report:

Same spreadsheet with another base date

  • Sum and comparison columns are exported as plain cell formulas, following the comparison method of each KPI (percentage, difference, percentage points).
  • Styles (bold, italic, colors, font size) and number formats of the report are kept.
  • The function uses the batch endpoint of spreadsheet (serverData.batch), and the server calls mis.report.evaluate() once per report, period, companies and sub-KPI, whatever the number of KPI cells.

Limits (see ROADMAP)

  • Columns that MIS.KPI can not reproduce (analytic filters, alternative move line sources, budgets) are exported as static values and flagged in their header.
  • Details by account are not exported.
  • The export always creates a new spreadsheet.
  • No autocompletion of KPI names, no drill-down from a cell and no side panel yet.

How to test

Install with demo data: the Spreadsheet demo P&L by month MIS report comes with a few journal entries of the last three months. Open it and click Spreadsheet.

Add a MIS.KPI spreadsheet function returning the value of a KPI of a
MIS report template over a period, and a Spreadsheet button on MIS
report instances creating a spreadsheet where every KPI cell is a live
formula.

Assisted-by: Claude Code
@mileo

mileo commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Superseded by OCA#147.

@mileo mileo closed this Nov 19, 2026
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.

1 participant