From 0d7c9db6d17e3268ae01a5b2d79b513c5b24a34f Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Thu, 22 Apr 2021 14:18:57 +0000 Subject: [FIX] purchase_product_matrix: avoid crash on product reorder Open a purchase order with several lines Switch to Edit mode Use the movement arrow on the left of a line to move it upward/downward At the end of the operation a traceback will popup opw-2508480 closes odoo/odoo#69699 Signed-off-by: Nicolas Lempereur (nle) --- .../static/src/js/product_matrix_configurator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/purchase_product_matrix') diff --git a/addons/purchase_product_matrix/static/src/js/product_matrix_configurator.js b/addons/purchase_product_matrix/static/src/js/product_matrix_configurator.js index b36844aeff5..4f429f4fcc6 100644 --- a/addons/purchase_product_matrix/static/src/js/product_matrix_configurator.js +++ b/addons/purchase_product_matrix/static/src/js/product_matrix_configurator.js @@ -99,7 +99,7 @@ var MatrixConfiguratorWidget = relationalFields.FieldMany2One.extend({ */ reset: async function (record, ev) { await this._super(...arguments); - if (ev.data.changes && ev.data.changes.product_template_id && record.data.product_template_id.data.id) { + if (ev && ev.data.changes && ev.data.changes.product_template_id && record.data.product_template_id.data.id) { this._onTemplateChange(record.data.product_template_id.data.id, ev.data.dataPointID); } }, -- cgit v1.2.3