Files
odoo_source/addons/purchase_product_matrix/static
Achraf (abz) d907f86b4e [FIX] purchase_product_matrix: Allow to change PO lines order
What are the steps to reproduce your issue ?

    1. Install 'purchase_product_matrix'
    2. try to edit a PO with more than one line
    3. try to change the order of a product line

What is currently happening ?

    Traceback: TypeError: Cannot read property 'data' of undefined

What are you expecting to happen ?

    Change order lines without traceback

Why is this happening ?

    There is a function 'reset' that checkes if 'ev' exists:
    https://github.com/odoo/odoo/blob/e0af10ccc92cb3b07f0eea6fa44ebf5a1bdc86aa/addons/sale/static/src/js/product_configurator_widget.js#L119

    And in 'purchase_product_matrix' there is a override of this same function that calls it
    and then tries to use an 'ev' attribute without checking it before

How to fix the bug ?

    Check 'ev' before accessing it

opw-2513061

closes odoo/odoo#69856

X-original-commit: 25312bc576b9e0330eb316e77d8a177ee0434832
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-04-26 15:26:39 +00:00
..