summaryrefslogtreecommitdiff
path: root/addons/stock/static/src/js/forecast_widget.js
diff options
context:
space:
mode:
authorsvs-odoo <svs@odoo.com>2020-12-11 15:25:05 +0000
committersvs-odoo <svs@odoo.com>2020-12-11 15:44:47 +0000
commit22a2845909c6cf96536aa4e664fca5d1ff3fb589 (patch)
tree0a189ec1084e526292167b5f8e0e903fcfda4c4d /addons/stock/static/src/js/forecast_widget.js
parent2891f9e24f10f42fd997e2f42aee80a53bc6acaa (diff)
[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#63258 Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Diffstat (limited to 'addons/stock/static/src/js/forecast_widget.js')
-rw-r--r--addons/stock/static/src/js/forecast_widget.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock/static/src/js/forecast_widget.js b/addons/stock/static/src/js/forecast_widget.js
index d6d848f2566..c7bb19f9878 100644
--- a/addons/stock/static/src/js/forecast_widget.js
+++ b/addons/stock/static/src/js/forecast_widget.js
@@ -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 () {