summaryrefslogtreecommitdiff
path: root/addons/purchase_product_matrix
diff options
context:
space:
mode:
authorAndrea Grazioso (agr-odoo) <agr@odoo.com>2021-04-22 14:18:57 +0000
committerAndrea Grazioso (agr-odoo) <agr@odoo.com>2021-04-22 14:18:57 +0000
commit0d7c9db6d17e3268ae01a5b2d79b513c5b24a34f (patch)
tree28fab931c660aa28f5c3ba35c79f4263b5a6da70 /addons/purchase_product_matrix
parent660181c1bd4230644ca4bcfa6d8793bf76996c97 (diff)
[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) <nle@odoo.com>
Diffstat (limited to 'addons/purchase_product_matrix')
-rw-r--r--addons/purchase_product_matrix/static/src/js/product_matrix_configurator.js2
1 files changed, 1 insertions, 1 deletions
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);
}
},