Sometimes it is necessary to temporarily or permanently prohibit the sale of a product or to prevent work with a certain customer or supplier. For example:
- the product has been discontinued;
- the supplier is unreliable;
- the client has a debt.
For this, Odoo uses warnings, which can be configured as:
- information message, or
- complete prohibition of action (blocking).
Step 1: Turn on the alerts feature
- Go to the "Settings" module:
2. In the "Sales" section, enable the "Sales Alert" option. Save the changes:
3. In the "Purchase" section, enable the "Warnings" option. Save the changes:
Step 2: Blocking a partner
- Go to the "Contacts" module:
2. Open the card of the desired partner.
3. In the "Internal Notes" tab, find the field:
- Warning when creating a sales order,
- Warning when creating a purchase order.
4. Select an option:
- Warn — a message will appear, but the action is allowed.
- Block — will prevent the creation of the document.
5. In the field below the drop-down list, enter an explanation (for example, "Customer blocked due to debt").
Step 3: Blocking the product
- Open the desired product.
- Go to the "Sales" or "Purchases" tab. Find the "Warning when selling this product"/"Warning when buying this product" field, respectively:
3. Set up a warning or block on the product in the same way as you did with the contact.
Step 4: Placing a sales/purchase order with a blocked product/partner
If you try to use such a partner or product in the corresponding document (sale, purchase), the system will issue a warning or completely prohibit the action:
To remove the block, in the contact/product settings, delete the comment and change the settings to "No message":