Before this commit, the product 'My Company Tshirt' had too much PTAL and PTAV which lead to an overloaded matrix.
This commit removes the 'Sleeves' attribute, reorder the other attributes and remove the Size attributes '2XL' and '3XL'.
task-2052537
closesodoo/odoo#37543
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Before this commit, it wasn't easy to find a demo product template that opens either with the product configurator or with the matrix from a list view.
To fix that, this commit appends '(CONFIG)' to the name of all demo product templates that open with the product configurator and '(GRID)' to all demo product templates that open with the matrix.
task-2052537
* 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