[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) <sig@openerp.com>
This commit is contained in:
Goffin Simon
2020-12-28 16:59:10 +00:00
parent 0015426708
commit a6a1d52b4e
@@ -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();
}