[FIX] stock: click on forecast widget
Before this commit, once a field has the 'forecast_widget', the user is
redirect to the forecast report also when they clicks on the field.
How to reproduce:
- Creates/Opens a delivery;
- In Operations list, clicks on the reserved qty. field of one of the
line -> It opens the forecast report.
The wanted behaviour is the user is redirected to the report only if
they clicks on the widget's button, not on the field itself.
task-2415918
closes odoo/odoo#64575
X-original-commit: 22a2845909c6cf96536aa4e664fca5d1ff3fb589
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
This commit is contained in:
@@ -34,7 +34,7 @@ const ForecastWidgetField = AbstractField.extend({
|
||||
data.will_be_fulfilled = utils.round_decimals(data.forecast_availability, this.record.fields.forecast_availability.digits[1]) >= utils.round_decimals(data.product_qty, this.record.fields.product_qty.digits[1]);
|
||||
|
||||
this.$el.html(QWeb.render('stock.forecastWidget', data));
|
||||
this.$el.on('click', this._onOpenReport.bind(this));
|
||||
this.$('.o_forecast_report_button').on('click', this._onOpenReport.bind(this));
|
||||
},
|
||||
|
||||
isSet: function () {
|
||||
|
||||
Reference in New Issue
Block a user