Set up a DEMO product with
- warning message on sale
- variant
- Order Grid Entry as Sales Variant Selection
Create SO, configure this product
Warning message doesn't display
opw-2442352
closesodoo/odoo#64894
X-original-commit: 50ccbdb983fda289cb9fe740ae711d510386d878
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
- Install Sales and Sale Matrix
- Go to Sales > Configuration > Settings and activate "Variant Grid Entry"
- Go to Products and edit a product with variants (lets call it "Product A"):
* For "Sales Variant Selection" in "Variants tab", choose "Order Grid Entry"
- Go to Sales > Orders > Quotations and create a quotation
* Add any product without Variant Selection set to "Order Grid Entry"
* Add "Product A" with 1 attribute
* Add any product without Variant Selection set to "Order Grid Entry"
- Here there are 3 products in the quotation with "Product A" at the second position
- Save the quotation
After the save the position of "Product A" is moved to the last position.
In a new quotation, every new order line has a sequence set to 10, except for products
with Variant Selection set to "Order Grid Entry" that set the sequence to the previous one +1,
which will put it in the last position even if another product is added after it.
[All of the above steps and explanations can also be applied to Purchase]
opw-2303096
closesodoo/odoo#55342
X-original-commit: 17c1caec4fefd089586c62c40ac5a2232eed3dcc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Go to Sales > Configuration > Settings
- Activate "Variant Grid Entry"
- Go to Products and edit a product with variants (lets call it "Product A")
- For "Sales Variant Selection" in "Variants tab", choose "Order Grid Entry"
- Go to Sales > Orders > Quotations and create a quotation
* Add any product except "Product A"
* Add another product except "Product A" and the previous one
* Switch the 2 added products with the sequence arrow widget.
It allows to be sure that the 2 added products have 2 different sequences.
* Add "Product A" with 1 attribute
- Here there are 3 products in the quotation with "Product A" at the third position
- Save the quotation
After the save the position of "Product A" is not the same anymore.
The bug comes from the fact that when using the matrix configurator, no sequence is provided
and the product is added with the default sequence of the SO line which is 10.
The issue is fixed by checking the sequence of the previous SO line if there is one.
[All of the above steps and explanations can also be applied to Purchase]
opw-2221991
closesodoo/odoo#51112
X-original-commit: 1a2d7e3fa0f33d90c74d3fd5a5ef486b56d8f512
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
* account, hr_expense, mrp, sale, sale_product_configurator, stock_account,
website_sale, website_sale_comparison
Before this commit, the `product.attribute.value` were stored on the variants.
This required filtering of attribute lines to find the appropriate matching
`product.template.attribute.value` that were used in most of the business code,
such as when computing the `price_extra`.
This also prevented to have multiple attribute lines for the same attribute,
which is needed to handle use cases such as grape varieties for wine products.
This will be done in the following commit.
After this commit, the combination of `product.template.attribute.value` will be
directly stored on the product variant.
Other changes
=============
Add `combination_indices` on product, which allows to quickly find a variant
matching a combination (1 simple indexed equality query as opposed to 1 query
with as many joins as there are attribute lines), and to add an easy
SQL constraint to ensure active combination uniqueness.
Add active field on `product.template.attribute.line` and
`product.template.attribute.value`, with the same behavior as variants:
They become archived if they can't be unlinked. This allows to keep the database
consistent, such as archived variants correctly keeping all their values, sales
order lines keeping their custom and no_variant. This is done with the help of
`ondelete=restrict` on the corresponding m2m fields, and the `unlink` methods
falling back to archiving when `unlink` is restricted.
Part of task-1912579
PR: #32946