OdooWiki OCA HUB

Sale Order Country Allowed Product

sale_order_country_allowed_product folder_open OCA/sale-workflow open_in_new
Sales License: AGPL-3

This module allows to restrict the selection of products in sale order lines based on the shipping address country.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Restrict which products can be sold based on the shipping address country. Products can be limited to specific countries, and sales orders with unavailable products cannot be confirmed.

This module adds a 'Sale Allowed Countries' field on product templates, visible in the Sales tab under 'Country Availability'. If left empty, the product is available everywhere. When a sales order is created, the system checks each order line against the shipping address country. If a product is not allowed in that country, a warning message appears at the top of the sales order form listing the unavailable products.

Users cannot confirm a sales order if any line contains a product not allowed in the shipping country. A validation error blocks confirmation. However, users in the 'Ignore products sale countries' group can bypass this restriction and confirm such orders.

When selecting products in sales order lines, the product list is automatically filtered to show only products allowed in the shipping country. This filtering applies to both the product field and the product template field in order lines. The restriction is based on the shipping address country, not the customer's country.

The module extends product.template, sale.order, and sale.order.line models. It adds a computed boolean field country_available on order lines and a computed HTML message on sales orders. The product search is modified to apply the country filter when the context indicates restriction is needed.

Depends on

sale
Models and fields (3)
  • sale.order · extends an existing modelunavailable_product_msg
  • sale.order.line · extends an existing modelcountry_available
  • product.template · extends an existing modelsale_allowed_country_ids (Sale Allowed Countries)

Text generated by AI (DeepSeek) from reading the Odoo 16.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: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/sale-workflow.

terminal Installation and usage

OCA documentation · Odoo 16.0

To select the countries in which a product is available you need to:

  • Go to a product template form view.
  • Select the countries in which the product is available in field "Sale Allowed Countries".

Users in group "Ignore products sale countries" will gain access to all salable products in sale orders, even to those that are not available in the shipping addres country.

Users in "Ignore products sale countries" group will be able to select all the salable products in sale order lines, even those that are not available in the country of the shipping address. Users who do not belong to that group, will only be able to select the products available in the country of the shipping address. Products with the "Sale Allowed Countries" field empty are considered to be available in all countries.

A message on the top of the sale order will be displayed if the sale order contains unavailable products.

Users who do not belong to the "Ignore products sale countries" group will be unable to confirm sale orders containing unavailable products.

No verified information in OCA: Installation.

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.