This question has been flagged

Hello,


I am encountering an issue with the configuration of product variants in Odoo, and I'm seeking assistance in resolving it.


Here's the problem I'm facing:


I have a product with two variants, let's say a t-shirt with sizes L and XL. I want customers to be able to order size L even if it's out of stock, but I want to restrict orders for size XL when it's out of stock.


I noticed that there is a checkbox named "Continue Selling if the product is out of stock" in the product variant configuration under the Sale tab. However, when I check this checkbox for one variant (e.g., size L), it automatically applies to the other variant (e.g., size XL) as well. This is causing unwanted behavior as I only want to apply this option to size L, not to all variants.


Could you please provide guidance on how to configure the product variants so that the "Continue Selling" option applies selectively to specific variants, rather than being applied universally across all variants?


Thank you for your attention to this matter.




Avatar
Discard
Best Answer

The "Continue Selling" checkbox is a related field and is therefore saved in the product template.
Unfortunately, you cannot achieve it with odoo's built-in options, you would have to implement changes with custom developing.

Avatar
Discard
Author

Thank you for your response and explanation regarding the limitations of Odoo's built-in options for configuring product variants.

Considering your insights, I'm exploring a potential workaround for my requirement. Instead of relying solely on the "Continue Selling" checkbox, I'm considering utilizing the "Additional Product Tags" feature available at the variant level.

My idea is to assign a custom tag, let's say "unavailable", to specific variants for which I want to restrict sales when they are out of stock. By implementing custom logic in the frontend, I would then disable the "Add to Cart" button for variants tagged with "unavailable", thereby achieving the desired behavior of selectively allowing orders for certain variants even when they are out of stock.

Before proceeding further with this approach, I wanted to ask for your expert opinion: Do you think this idea could work effectively? Are there any potential challenges or drawbacks with implementing this solution that I should be aware of?

Thank you for your time and expertise.