Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions mis_builder/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,17 @@ can be found on GitHub.
Changelog
=========

19.0.1.1.0 (2026-07-20)
-----------------------

Features
~~~~~~~~

- Add KPI option to expand detail rows by partner (customer/vendor), in
addition to the existing expansion by account. The new ``detail_by``
field supersedes ``auto_expand_accounts`` while keeping backward
compatibility.

18.0.1.7.2 (2025-10-29)
-----------------------

Expand Down
2 changes: 1 addition & 1 deletion mis_builder/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "MIS Builder",
"version": "19.0.1.1.1",
"version": "19.0.1.1.0",
"category": "Reporting",
"summary": """
Build 'Management Information System' Reports and Dashboards
Expand Down
41 changes: 41 additions & 0 deletions mis_builder/migrations/19.0.1.1.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2026 Odoo Community Association (OCA)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).


def migrate(cr, version):
"""Map legacy detail expansion flags onto detail_groupby."""
cr.execute(
"""
SELECT column_name
FROM information_schema.columns
WHERE table_name = 'mis_report_kpi'
AND column_name IN ('detail_by', 'detail_groupby', 'auto_expand_accounts')
"""
)
columns = {row[0] for row in cr.fetchall()}
if "detail_groupby" not in columns:
return

if "detail_by" in columns:
cr.execute(
"""
UPDATE mis_report_kpi
SET detail_groupby = CASE
WHEN detail_by = 'account' THEN 'account_id'
WHEN detail_by = 'partner' THEN 'partner_id'
WHEN auto_expand_accounts IS TRUE THEN 'account_id'
ELSE detail_groupby
END
WHERE detail_groupby IS NULL
OR detail_groupby = ''
"""
)
else:
cr.execute(
"""
UPDATE mis_report_kpi
SET detail_groupby = 'account_id'
WHERE auto_expand_accounts IS TRUE
AND (detail_groupby IS NULL OR detail_groupby = '')
"""
)
Loading
Loading