Stock status in eCommerce
Unfortunately, odoo doesn't consider stock status of a products in eCommerce and customers are able to order out-of-stock items.
But on the other hand, the strength of the odoo is module structure to make modifications easily.
So, I've made a small module website_sale_stock_status
to fix this issue.
The module adds automatic ribbons:
- DISCONTINUED – stock is 0 and the status is End of Life or Obsolete.
- BACKORDERED – stock is 0 and the status is Normal,
It also puts ribbons text at the product page and disables "Add to cart" feature if product is discontinued.
By default, stock status is updated every hour. It can be changed at Settings/Technical/Automation/Scheduled Actions
Repository: https://github.com/yelizariev/addons-yelizariev/tree/8.0/website\_sale\_stock\_status