Files
odoo_source/addons
david 23ff4fba9b [FW][FIX] sale: do not suggest unsaleable optional products
If we had a product as an option to multiple products and we want to stop selling it we'll set sale_ok to `False`. We won't be able to add it to the sale lines but it will keep showing up in the products options popup and we'll be able to add it to the order that way. It must be prevented to keep a coherent behavior.

Description of the issue/feature this PR addresses:

- Add a product as optional product A to several products (B, C, D).
- Set that product to `sale_ok` = False
- Create a sale order

Current behavior before PR:

- Product A can't be selected from the order lines (👍 )
- Add either product B, C or D and the optional products popup shows up allowing us to add Product A to the sale lines.

Desired behavior after PR is merged:

When a product is discarded from sale, we should not be able to add it as an option. Removing it as option in the affected product is not a proper workflow, as the product could be simply temporarily out of sale due to multiple commercial reasons.

cc @Tecnativa TT36178

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#90708

Forward-port-of: odoo/odoo#90593
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-05 22:52:41 +02:00
..
2022-05-04 15:38:25 +02:00
2022-04-22 16:59:47 +02:00
2022-04-29 13:13:27 +02:00
2022-02-22 17:11:01 +00:00