is it possible to hide out-of-stock items/variants on website?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
is it possible to hide out-of-stock items/variants on website?
Hi,
Create a custom module or add this to an existing one:
from odoo.addons.website_sale.controllers.main import WebsiteSale
from odoo.http import request
class WebsiteSaleCustom(WebsiteSale):
def _get_search_domain(self, search, category, attrib_values, **kwargs):
domain = super()._get_search_domain(search, category, attrib_values, **kwargs)
domain += [('qty_available', '>', 0)]
return domain
You can also use 'virtual_available' instead of 'qty_available' if you want to account for incoming stock.
ihope it is use full
Hi,
Please refer to the following links:
Module: https://apps.odoo.com/apps/modules/18.0/website_hide_variants
Solved Forum
1. https://www.odoo.com/sl_SI/forum/pomoc-1/hide-out-of-stock-variants-on-ecommerce-179359
Hope it helps.
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Olİlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
---|---|---|---|---|
Alternative products not shown
Çözüldü
|
|
1
Nis 24
|
3308 | |
|
1
Kas 22
|
2299 | ||
|
2
Mar 15
|
3960 | ||
|
1
Ara 23
|
2799 | ||
|
1
Kas 23
|
2060 |