[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#69724 X-original-commit: 0d7c9db6d17e3268ae01a5b2d79b513c5b24a34f Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user