Website Country Restriction Plugin for Odoo

1. Introduction

The Website Country Restriction plugin enables precise control over the countries available for selection in all address forms on your Odoo website—including billing, shipping, and customer profile forms. This is especially useful for businesses that operate in specific regions, helping to prevent users from entering unsupported countries during checkout or while updating their account information.

Intended Users:

  • Website Managers
  • E-commerce Administrators
  • Store Owners

2. Key Features

  • Restrict Available Countries
    • Restrict country selection across all website address forms—including billing, shipping, and account-related addresses—to ensure customers can only enter addresses from supported regions. This helps prevent delivery issues and minimizes invalid or unsupported entries.
  • Set a Default Country
    • Set a default country to be preselected in the country dropdown across all website address forms. This enhances user experience by reducing input effort and guiding users toward the most used or valid option.

3. Installation

To install the Website Country Restriction plugin:

  • Upload the Plugin to the Addons Path
    • Extract the plugin ZIP file.
    • Copy the extracted folder to your Odoo custom addons directory.
    • Ensure the directory has the correct permissions.
  • Update the App List
    • In Odoo, go to Apps.
    • Click the “Update App List” from the menu (you may need to enable Developer Mode to see this option).
    • Confirm the update.
  • Install the Plugin
    • Use the search bar to find “Website Country Restriction.
    • Click the “Install” button to activate the plugin.

4. Configuring Countries

  • Navigate to Settings > Website > Available Countries > Country Restrictions
  • Click on the ‘Available Countries’ drop down and select the countries that need to be available for billing in Website.
  • Click on the ‘Default Country’ drop down and select the country that need to be preselected as default country in checkout for billing in Website.
  • Save Changes

Note: Existing customer records will not be affected — only future entries will follow the restrictions.

5. Country Restriction Inside Website

  • Navigate to Website Module > Shop Menu.
  • Select a Product and Add to Cart.
  • Proceed to Checkout > Checkout
  • On the Confirm Order Page, click on Edit pen icon on the Billing & Shipping Address.
  • Click on Add address.
  • Navigate to bottom to view the Country selection dropdown.
  • We can see that the Default country selected in configurations will be preselected here.
  • Click on the Country dropdown, only the available countries selected will be listed here.
  • If a user selects an address for billing or shipping with a country that is not in the list of available countries and attempts to proceed, an error message should be displayed to prevent submission.

Note: If you edit an existing address, the country dropdown will reflect only the available countries. However, this selection will not affect the actual address data unless the changes are saved.

The country restriction is also applicable in customer profile addresses also. For viewing that, navigate to My Account > Edit Information

6. Technical Requirements / Compatible With: 

  • Technical Requirements: 
    • Odoo Module: website_sale (must be installed and configured)
  • Compatible With:
    • Odoo Community Edition v17.0
    • Odoo Enterprise Edition v17.0

7. Changes Log / Release Notes

  • Version 1.0.0: August 2025
    • Initial release.

8. Support 

If you have questions, use our contact form at webshopextension.com or email at support@webshopextension.com.