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
closesodoo/odoo#69856
X-original-commit: 25312bc576b9e0330eb316e77d8a177ee0434832
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/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>
- Install purchase_product_matrix
- Go to Purchase and create a PO
- In PO Line, type a text (i.e. test) in product field and use quick create option
Description and UoM fields should be updated following product creation, but they are not.
"onchange_product_id" is not triggered.
"purchase_product_matrix" module overrides "purchase.order" form view by replacing product_id
field by product_template_id field.
"_onFieldChanged" function should execute "_onTemplateChange" when product_template_id is changed
and if id is set, which would trigger "field_changed" on product_id, but it cannot be done after
a quick create as id is false.
opw-2462538
closesodoo/odoo#67605
X-original-commit: 3c082b9a47be35579a454f13edc230ac3029922d
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Let's assume the following scenario with 'purchase_product_matrix'
module installed:
- create a new Purchase Order
- add a line in the one2many
- select "Customizable desk" as product
- [the desk matrix opens]
- close the matrix
- select "Conference chair" instead
- [the desk matrix opens, whereas it should be the chair one]
It didn't work because of a small bug in the FieldOne2Many. This
field is configured to be reset when any other field in the view
changes. The product configurator feature relies on that. However,
when another field changes, the One2Many didn't update its internal
state with the new record (and it skipped the rendering, which is
fine). The matrix product configurator thus read an obsolete value
in the internal of the one2many.
Since the internal state is now always up-to-date, we can directly
read there the grid information, instead of looking inside other
fields that have been updated (attempt done in [1])
It would be nice to rethink the whole product configurator stuff
in master, to make it more robust, maybe when converting it to owl?
[1] https://github.com/odoo/odoo/commit/21bcafc053be7f80eed7a684fee2dc1e3caaafa5
opw~2421798
closesodoo/odoo#64683
X-original-commit: 69cadbe1be6320d96fe9bc5bf8dd808f87d735c0
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Change the default rouning digits of all UoMs to be two, also change the
decimal.precision of UoM to be two. Adapt all the tests.
Also to avoid hardcoded digits in `should_consume_qty` widget.
PR #56000
X-original-commit: 460ec0402a2352a5b179d81935f7230f6bc97cb7
This commit moves some step utils in a dedicated file and add new ones.
These steps will be very useful for the Main Flow Tour to avoid
duplicated code.
To do this, we also had to transform it into functions to allow
utils to call each other. Existing one are converted for
standardization purpose.
Note that 'WEBSITE_NEW_PAGE' wasn't considered as an util.
This is a very simple step only used twice.
as we cannot do the test in product_matrix, add the purchase equivalent
in purchase_product_matrix to also test the matrix in this case.
X-original-commit: 9d7024a5327939de3c145928782936000d26bd33