Skip to content
Open
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
10 changes: 10 additions & 0 deletions mis_builder/static/src/components/mis_report_widget.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Loading