Skip to content

[18.0][BUG] mis_builder: JS error on drilldown for computed KPI lines #776

@dnplkndll

Description

@dnplkndll

Description

Clicking a computed KPI cell (e.g. profit - loss) in the MIS report widget triggers:

UncaughtPromiseError: No view found for act_window action undefined

Root cause

mis_report_instance.drilldown() returns False when the expression has no account variable (AEP.has_account_var() is False for computed expressions like profit - loss). The JS handler calls this.action.doAction(action) without checking for a falsy return:

// mis_report_widget.esm.js line ~137
async drilldown(event) {
    const drilldown = JSON.parse(event.target.dataset.drilldown);
    const action = await this.orm.call(
        "mis.report.instance", "drilldown",
        [this._instanceId(), drilldown],
        {context: this.context}
    );
    this.action.doAction(action);  // ← action is False
}

Expected behavior

Clicking a computed KPI cell should either:

  1. Do nothing (silently ignore), or
  2. Show a notification that drill-down is not available for computed lines

Steps to reproduce

  1. Create a MIS report with a computed KPI (e.g. profit - loss)
  2. Create a report instance with at least one period
  3. Click on the computed KPI cell value
  4. Observe the JS error

Environment

  • Odoo 18.0 CE
  • mis_builder 18.0.1.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions