[18.0][FIX] mis_builder: guard against falsy drilldown action#777
[18.0][FIX] mis_builder: guard against falsy drilldown action#777
Conversation
When a user clicks a computed KPI cell (e.g. ``profit - loss``),
``mis_report_instance.drilldown()`` returns ``False`` because the
expression has no account variable. The JS handler passed this
falsy value to ``doAction()`` which threw:
No view found for act_window action undefined
Add a truthy check before calling ``doAction()``.
Closes OCA#776
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Hi @sbidoul, |
|
Hi, this change looks good but I really wonder why such a cell would be clickable in the first place. For instance with the demo report you can see on runboat, the Total row is not clickable. |
|
Closing this — the root cause turned out to be a migration issue, not a missing JS guard. After migrating from 17.0 to 18.0, On a clean 18.0 install, The proper fix is a migration script to recompute the field: #780 / ledoent#3 |
Description
Clicking a computed KPI cell (e.g.
profit - loss) in the MIS reportwidget triggers a JS error:
Root cause
mis_report_instance.drilldown()returnsFalsewhen the expressionhas no account variable (
AEP.has_account_var()isFalsefor computedexpressions). The JS handler passes this falsy value directly to
this.action.doAction().Fix
Add a truthy check before calling
doAction().Closes #776