OdooWiki OCA HUB

Product Country Restriction

product_country_restriction folder_open OCA/product-attribute open_in_new
Uncategorised License: AGPL-3

This module allows to define several rules to restrict product flows based on countries or country groups (Embargoes).

It provides rules that apply:

  • Globally (for all products)
  • Per Category
  • Per Product
  • Per Variant

Moreover, these rules can be set with date windows.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Lets you define country embargo rules that restrict which products may be sold or shipped to specific countries or country groups, with optional date windows and per-company strategy.

This module adds a new "Product Embargoes" area where you create restrictions. Each restriction targets one or more countries and/or country groups, and contains items that say which products are affected.

  • Rules can apply globally (all products), to a product category (including sub-categories), to a specific product template (and all its variants), or to a single product variant.
  • Each item can have a start and end date, so a restriction only applies during that period. The system checks that the start date is not later than the end date.
  • On the company, you choose a strategy: "Authorize" (all products are allowed except those matching a restriction) or "Restrict" (all products are blocked except those matching a rule).
  • On a customer/supplier contact form, a "Country Restriction" field is available, defaulting from the company setting.
  • On the country form, a smart button shows how many product country restrictions apply to that country and opens the filtered list.
  • Restrictions are company-specific: users only see restrictions of their allowed companies.

The module touches product.country.restriction, product.country.restriction.item, product.country.restriction.rule, product.template, product.product, res.company, res.country and res.partner. It provides helper methods that other modules can call to check whether a product is restricted for a given country and date, and to build an explanatory message.

Depends on

baseproduct
Models and fields (9)
  • res.company · extends an existing modelcountry_restriction_id, country_restriction_strategy
  • res.country · extends an existing modelproduct_country_restriction_ids, product_country_restriction_count
  • res.partner · extends an existing modelcountry_restriction_id (Country Restriction)
  • product.product · new model
  • product.template · new model
  • country.restriction.mixin · new model
  • product.country.restriction · new modelname, active, item_ids (Country Restriction Items), sequence, company_id (Company), country_ids (Countries), country_group_ids (Country Groups), resulting_country_ids
  • product.country.restriction.item · new modelname, rule_id (Rule), end_date, sequence, rule_code, product_id (Variant), start_date, restriction_id, product_category_id (Product Category), product_template_id (Product)
  • product.country.restriction.rule · new modelcode, name, sequence

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/product-attribute.

terminal Installation and usage

OCA documentation · Odoo 16.0

This module cannot be used alone.

It defines method that helps to define if product can be used in a particular country or not for a given date (today by default).

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.