From 61f22e3f2f6ff38103dd77a4478c4f8a890c0ecc Mon Sep 17 00:00:00 2001 From: Hotdgo9 Date: Mon, 6 Jul 2026 18:36:13 +0200 Subject: [PATCH] [FIX] mis_builder: widget instance resolution on Odoo 19 (props.value removed) On Odoo 19 the owl field API no longer provides props.value, so _instanceId() fell through to context.active_id. Any mis.report.instance form opened without active_id in the context (e.g. a plain act_window with res_id behind a menuitem) crashed in willStart: orm.read received [undefined] and raised "Invalid ids list", leaving the view unusable. Resolve the instance from this.props.record.resId first (the modern field API), keeping the props.value and active_id fallbacks for legacy call sites and the dashboard case. mis_builder's own flows never hit this because preview()/print_pdf() pass a context carrying active_id, which is why CI stays green. Co-Authored-By: Claude Fable 5 --- .../static/src/components/mis_report_widget.esm.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mis_builder/static/src/components/mis_report_widget.esm.js b/mis_builder/static/src/components/mis_report_widget.esm.js index c00d6177a..cf92595a5 100644 --- a/mis_builder/static/src/components/mis_report_widget.esm.js +++ b/mis_builder/static/src/components/mis_report_widget.esm.js @@ -102,6 +102,16 @@ export class MisReportWidget extends Component { * @returns int */ _instanceId() { + /* + * When the widget is used as a field in a mis.report.instance + * form view, the record it belongs to is the instance itself. + * This is the modern owl field API; props.value is kept below + * as a fallback for legacy call sites. + */ + if (this.props.record && this.props.record.resId) { + return this.props.record.resId; + } + if (this.props.value) { return this.props.value; }