Problem
After migrating from 17.0 to 18.0, clicking any drilldown cell in a MIS report throws:
No view found for act_window action undefined
The drilldown() method returns an action with res_model: False and views: [].
Root cause
source_aml_model_id was introduced in 18.0 as a new stored computed field on mis.report.instance.period:
source_aml_model_id = fields.Many2one(
...
compute="_compute_source_aml_model_id",
store=True,
...
)
On fresh installs, _compute_source_aml_model_id populates this correctly. But after migration from 17.0, existing periods have source_aml_model_id = NULL because:
- The field didn't exist in 17.0
- The migration script (
18.0.1.3.0/post-migration.py) doesn't recompute it
- Odoo doesn't automatically recompute stored computed fields for existing records during module upgrade
Since drilldown() reads period.source_aml_model_name (which is related="source_aml_model_id.model"), it gets False, producing an action without res_model.
Fix
Add a recompute step to the migration or a post-init hook:
env["mis.report.instance.period"].search([])._compute_source_aml_model_id()
Or via SQL:
UPDATE mis_report_instance_period p
SET source_aml_model_id = r.move_lines_source
FROM mis_report_instance i
JOIN mis_report r ON r.id = i.report_id
WHERE p.report_instance_id = i.id
AND p.source_aml_model_id IS NULL
AND r.move_lines_source IS NOT NULL
AND p.source IN ('actuals', 'actuals_alt');
Verified
- Clean install:
source_aml_model_id is populated correctly — drilldown works
- After migration:
source_aml_model_id is NULL on all periods — drilldown fails
- After SQL fix: drilldown works again
Environment
- Odoo 18.0 CE, migrated from 17.0
- mis_builder 18.0
Problem
After migrating from 17.0 to 18.0, clicking any drilldown cell in a MIS report throws:
The
drilldown()method returns an action withres_model: Falseandviews: [].Root cause
source_aml_model_idwas introduced in 18.0 as a new stored computed field onmis.report.instance.period:On fresh installs,
_compute_source_aml_model_idpopulates this correctly. But after migration from 17.0, existing periods havesource_aml_model_id = NULLbecause:18.0.1.3.0/post-migration.py) doesn't recompute itSince
drilldown()readsperiod.source_aml_model_name(which isrelated="source_aml_model_id.model"), it getsFalse, producing an action withoutres_model.Fix
Add a recompute step to the migration or a post-init hook:
Or via SQL:
Verified
source_aml_model_idis populated correctly — drilldown workssource_aml_model_idis NULL on all periods — drilldown failsEnvironment