diff --git a/addons/mrp/static/src/mrp_forecasted/forecasted_buttons.js b/addons/mrp/static/src/mrp_forecasted/forecasted_buttons.js index 7548e48cc20..25417bcfa8a 100644 --- a/addons/mrp/static/src/mrp_forecasted/forecasted_buttons.js +++ b/addons/mrp/static/src/mrp_forecasted/forecasted_buttons.js @@ -8,8 +8,8 @@ patch(ForecastedButtons.prototype, 'mrp.ForecastedButtons',{ setup() { this._super.apply(); onWillStart(async () =>{ - const res = await this.orm.call(this.resModel, 'read', [this.productId], {fields: ['bom_ids']}); - this.bomId = res[0].bom_ids && res[0].bom_ids[0]; + const res = (await this.orm.call(this.resModel, 'read', [this.productId], {fields: ['bom_ids', 'variant_bom_ids']}))[0]; + this.bomId = res.variant_bom_ids[0] || res.bom_ids[0]; }); },