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.
Screenshot 1: Website Country Restriction Module

Screenshot 1: Website Country Restriction Module

4. Configuring Countries

  • Navigate to Settings > Website > Available Countries > Country Restrictions
Screenshot 2: Website Country Restriction Settings

Screenshot 2: Website Country Restriction Settings

  • Click on the ‘Available Countries’ drop down and select the countries that need to be available for billing in Website.
Screenshot 3: Available Countries

Screenshot 3: Available Countries

  • 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.
Screenshot 4: Default Country

Screenshot 4: Default Country

  • 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.
Screenshot 5: Confirm Order Page

Screenshot 5: Confirm Order Page

  • 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.
Screenshot 6: Default Country in Delivery address page

Screenshot 6: Default Country in Delivery address page

  • Click on the Country dropdown, only the available countries selected will be listed here.
Screenshot 7: Available Countries dropdown

Screenshot 7: Available Countries dropdown

  • 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.
Screenshot 8: Address error page

Screenshot 8: Address error page

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
Screenshot 9: My Account page

Screenshot 9: My Account page

Screenshot 10: Countries dropdown

Screenshot 10: Countries dropdown

6. Technical Requirements / Compatible With:

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

7. Changes Log / Release Notes

  • Version 1.0.0: September 2025
    • Initial release.

8. Support

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