From a6a1d52b4ec6b60dc8b024045576313d7cad9474 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 28 Dec 2020 10:09:27 +0000 Subject: [PATCH] [FIX] sale: Product with a blocking warning raises a traceback Steps to reproduce the bug: - Let's consider a product P with a blocking message BM - Create a quotation Q and set P on it Bug: A traceback was raised. opw:2421946 closes odoo/odoo#63853 X-original-commit: e0af10ccc92cb3b07f0eea6fa44ebf5a1bdc86aa Signed-off-by: Simon Goffin (sig) --- addons/sale/static/src/js/product_configurator_widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/static/src/js/product_configurator_widget.js b/addons/sale/static/src/js/product_configurator_widget.js index 599cc4790cf..54bca05098f 100644 --- a/addons/sale/static/src/js/product_configurator_widget.js +++ b/addons/sale/static/src/js/product_configurator_widget.js @@ -120,7 +120,7 @@ var ProductConfiguratorWidget = relationalFields.FieldMany2One.extend({ if (ev.data.changes && !ev.data.preventProductIdCheck && ev.data.changes.product_template_id) { this._onTemplateChange(record.data.product_template_id.data.id, ev.data.dataPointID); } else if (ev.data.changes && ev.data.changes.product_id) { - this._onProductChange(record.data.product_id.data.id, ev.data.dataPointID).then(wizardOpened => { + this._onProductChange(record.data.product_id.data && record.data.product_id.data.id, ev.data.dataPointID).then(wizardOpened => { if (!wizardOpened) { this._onLineConfigured(); }