OdooWiki OCA HUB

Website Sale Stock Force Block

website_sale_stock_force_block folder_open OCA/e-commerce open_in_new
Website License: AGPL-3

This module extends the functionality of website sale stock module to allow to block sale for a product. Also re-use the field Custom Message for inform to customer of any message in these case.

auto_awesome What this module does

AI-generated from the code · Odoo 13.0

Adds a new stock availability option that completely blocks online sales of a product and shows a custom message to website visitors instead of the add-to-cart button.

This module adds a new choice to the product's inventory availability setting: "Block sales on website and display a message custom". When a product is set to this option, customers can no longer add it to their cart from the website.

  • On the shop page, the add-to-cart button is hidden for blocked products.
  • On the product page, the add-to-cart button is shown but disabled, and the custom message (the existing "Custom Message" field on the product) is displayed to explain why the product cannot be purchased.
  • The same option is available in the website settings under inventory availability.
  • If a customer somehow tries to add a blocked product to the cart (for example, through a direct link or an old cart), the system automatically adjusts the quantity to the available stock and shows a warning message.
  • When the module is uninstalled, any product using this option is reset to the default "never" availability setting.

The module affects product templates, website sale orders, and website settings. It also includes a demo product to illustrate the behaviour.

Depends on

website_sale_stock
Models and fields (2)
  • product.template · extends an existing modelinventory_availability
  • res.config.settings · extends an existing modelinventory_availability

Text generated by AI (DeepSeek) from reading the Odoo 13.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 13.0

Confirmed on 2026-11-03 in branch 13.0 of OCA/e-commerce.

terminal Installation and usage

OCA documentation · Odoo 13.0
  • Go to 'Website > Products > Products.
  • Go to eCommerce tab.
  • Set Block sales on website and display a message custom in inventory availability field.
  • You can set a custom message that appears when blocks this product.
  • Go to Website Shop.
  • Click in any product that you have been blocked.
  • If you have activate "Add to cart" option, for all products blocked are invisible.
  • You will see the add to cart button disabled.

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.