diff options
| author | Goffin Simon <sig@odoo.com> | 2020-12-28 10:09:27 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2020-12-28 10:43:01 +0000 |
| commit | e0af10ccc92cb3b07f0eea6fa44ebf5a1bdc86aa (patch) | |
| tree | 0345ee5b816fbeee1d853724788eb0f89abe4079 | |
| parent | 07bb73f133db661f3061c679af15293dbcf8ba38 (diff) | |
[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#63815
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
| -rw-r--r-- | addons/sale/static/src/js/product_configurator_widget.js | 2 |
1 files changed, 1 insertions, 1 deletions
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(); } |
