Commit Graph
10 Commits
Author SHA1 Message Date
Andrea Grazioso (agr-odoo) 4ffa07a884 [FIX] purchase_product_matrix,sale_product_matrix: not lose warn msg
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

closes odoo/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>
2021-01-21 17:57:14 +00:00
Anh Thao Pham (pta) 365dc62c93 [FIX] purchase/sale_product_matrix: fix sequence of order lines
- 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

closes odoo/odoo#55342

X-original-commit: 17c1caec4fefd089586c62c40ac5a2232eed3dcc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-03 15:19:24 +00:00
Anh Thao Pham (pta) 4c35489d47 [FIX] purchase_product_matrix,sale_product_matrix: fix order lines at save
- 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

closes odoo/odoo#51112

X-original-commit: 1a2d7e3fa0f33d90c74d3fd5a5ef486b56d8f512
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-12 15:04:12 +00:00
mreficent 5c7343c5ce [FIX] purchase_product_matrix: SO->PO typos
closes odoo/odoo#44666

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-05 16:19:47 +00:00
Victor Feyens 60c50d16a5 [FIX] *_product_matrix: use correct record for comparison.
X-original-commit: a1d2893f8bdd05ad277b4129932849865a48b1d6
2019-11-21 15:31:30 +00:00
Victor Feyens 16cf2ec5a2 [IMP] product_matrix: UI 2019-08-29 11:33:36 +00:00
Sébastien Theys 22a11a6f4d [REF] product, *: save product.template.attribute.value on variants
* 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
2019-08-26 13:01:13 +00:00
Victor Feyens 3c6437710a [IMP] *_product_matrix: UI 2019-08-20 14:02:29 +00:00
Victor Feyens 699a4614ef [FIX] purchase(_product_matrix): no_variant attributes
Display no variant infos in the purchase order line description.

closes odoo/odoo#35717

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-14 10:23:38 +00:00
Victor Feyens e6c2975e76 [ADD] (sale/purchase)_product_matrix 2019-08-07 12:50:09 +00:00