Skip to Content

Automatically Switch Website Currency Based on Visitor Location in Odoo (On-Premise Only)

Serynto Technologies, Author 25/07/2026 8 min read

Automatically Detect Customer Location and Display Prices in Their Local Currency

If you're running an international eCommerce store with Odoo, displaying prices in your customers' local currency can significantly improve their shopping experience. Customers are more likely to trust and purchase from a website that immediately shows prices in a familiar currency.

Odoo provides excellent support for multiple currencies and website pricelists, but it does not automatically switch the website currency based on a visitor's location.

Fortunately, Odoo On-Premise includes built-in GeoIP support, allowing you to determine a visitor's country from their IP address. By combining this with a simple custom module, you can automatically assign the appropriate website pricelist and display prices in the customer's local currency.

Important: This guide applies only to Odoo On-Premise installations (Community and Enterprise). It does not apply to Odoo Online or Odoo.sh, as those platforms handle infrastructure differently and do not allow direct server-level GeoIP configuration.

What You'll Learn

By following this guide, you'll be able to:

• Configure GeoIP on an Odoo On-Premise server.

• Enable multiple currencies in Odoo.

• Create website pricelists for different currencies.

• Automatically assign a website pricelist based on the visitor's country.

• Allow customers to manually change their preferred currency.

• Provide a better shopping experience for international customers.

How It Works

Visitor Opens Website
          │
          ▼
Odoo GeoIP Detects Visitor Country
          │
          ▼
Check Whether Customer Already Selected a Currency
          │
     Yes ─────────► Keep Existing Pricelist
          │
         No
          ▼
Find Matching Pricelist
          │
          ▼
Assign Website Pricelist
          │
          ▼
Display Product Prices in Local Currency

Prerequisites

Before implementing this solution, ensure you have:

• Odoo Community or Enterprise On-Premise

• Website module installed

• Website Sale module installed

• Accounting module

• Multi-Currency enabled

• GeoIP configured and working

• A custom module to assign website pricelists automatically

Step 1: Configure GeoIP (On-Premise)

Odoo already includes built-in GeoIP support for On-Premise installations.

Before developing any custom functionality, configure GeoIP by following Odoo's official documentation.

The documentation explains how to:

• Download the GeoLite2 database.

• Install the GeoIP database on your server.

• Configure Odoo to use the database.

• Test whether visitor location detection is working correctly.

• Configure custom database locations if required.
 

Once GeoIP has been configured successfully, Odoo can determine the visitor's country automatically whenever they access your website.

Reference: Odoo Official GeoIP Documentation

https://www.odoo.com/documentation/master/administration/on_premise/geo_ip.html

Step 2: Verify GeoIP Configuration

Before implementing automatic currency selection, verify that GeoIP is working correctly.

Some important checks include:

• GeoIP database is installed.

• Odoo can access the database.

• Visitor country is detected correctly.

• Reverse proxy configuration is correct (if using Nginx or Apache).

• proxy_mode is enabled if required.Remember that testing from:

localhost
127.0.0.1

will not return an actual visitor location.

Use a public IP or VPN for testing.

Step 3: Enable Multiple Currencies

Navigate to:

Accounting
→ Configuration
→ Settings

Enable:

• Multi Currencies
 

Save the settings.

Step 4: Activate Required Currencies

Navigate to:

Accounting
→ Configuration
→ Currencies

Activate every currency your business supports.

For example:

• USD

• EUR

• GBP

• INR

• AED

• CAD

• AUD

• SGD

• JPY
 

Keep exchange rates updated regularly to ensure accurate pricing.

Step 5: Create Website Pricelists

Navigate to:

Website
→ Products
→ Pricelists

Create one pricelist for each currency.

Example:

PricelistCurrency
IndiaINR
EuropeEUR
United StatesUSD
United KingdomGBP
UAEAED
AustraliaAUD

Configure pricing rules according to your business requirements.

Step 6: Map Countries to Pricelists

Create a mapping between visitor countries and website pricelists.

Example:

CountryCurrencyPricelist
IndiaINRIndia
GermanyEUREurope
FranceEUREurope
SpainEUREurope
ItalyEUREurope
NetherlandsEUREurope
BelgiumEUREurope
United StatesUSDUnited States
CanadaCADCanada
United KingdomGBPUnited Kingdom
UAEAEDUAE
AustraliaAUDAustralia

Since multiple countries may share the same currency, they can use the same pricelist.

Step 7: Create a Custom Module

Now create a small custom module that automatically selects the correct website pricelist.

The module should:

  1. Read the visitor's country using Odoo's built-in GeoIP information.
  2. Identify the corresponding website pricelist.
  3. Assign that pricelist to the current website session.
  4. Display product prices in the associated currency.

Since Odoo already detects the visitor's country, the customisation remains lightweight and easy to maintain.

Respect Customer Preference

A customer may manually choose a different currency using the website currency selector.

Your customisation should never override the customer's manual selection.

The recommended flow is:

Visitor Opens Website


Has Customer Already Selected a Currency?

Yes ─────────► Keep Selected Pricelist

No

Detect Country Using Odoo GeoIP


Assign Default Pricelist

This provides the best user experience while still offering automatic localisation.

Best Practices

To ensure good performance and usability:

• Detect the visitor's country only once per session.

• Store the selected pricelist in the user's session.

• Never override a manually selected currency.

• Keep exchange rates up to date.

• Use one pricelist per currency unless different pricing strategies are required.

• Test from multiple countries using a VPN or public IP addresses.

• Enable proxy_mode when Odoo is behind a reverse proxy.

• Verify that GeoIP detection works before implementing the custom module.

Common Issues

GeoIP Always Returns Empty

Possible reasons include:

• GeoLite database is missing.

• GeoLite database permissions are incorrect.

• Testing using localhost.

• Reverse proxy configuration is incorrect.

• proxy_mode is disabled.

• Odoo cannot access the GeoIP database.

Always verify your GeoIP installation before troubleshooting the custom module.

Wrong Country Is Detected

This usually happens when:

• Your reverse proxy forwards its own IP instead of the client's IP.

• VPN or proxy services are being used.

• GeoLite database is outdated.

Website Currency Does Not Change

Check that:

• Multi-Currency is enabled.

• Website pricelists exist.

• Pricelists are available for the current website.

• Country mapping is configured correctly.

• Your custom module assigns the correct website pricelist.

Benefits of Automatic Currency Selection

Implementing automatic currency selection offers several advantages:

• Improved user experience

• Increased customer trust

• Higher conversion rates

• Reduced manual currency switching

• Better international shopping experience

• More professional global storefront

Community vs Enterprise

This solution works for both:

EditionSupported
Odoo Community (On-Premise)
Odoo Enterprise (On-Premise)
Odoo.sh
Odoo Online

The GeoIP configuration described in this guide is available only for On-Premise deployments.

Conclusion

Odoo already provides the foundation for geographical location detection through its built-in GeoIP support for On-Premise installations. By combining GeoIP with Website Pricelists and a lightweight custom module, you can automatically display product prices in the visitor's local currency without relying on external IP lookup services.

This approach creates a more personalised shopping experience, reduces friction for international customers, and helps improve conversion rates. Since the implementation leverages Odoo's native capabilities, it is reliable, scalable, and easy to maintain for both Odoo Community and Enterprise On-Premise deployments.

References

This implementation relies on Odoo's built-in GeoIP functionality. Before implementing automatic currency selection, ensure that GeoIP is correctly configured by following the official documentation.

Odoo Official Documentation – GeoIP (On-Premise)

https://www.odoo.com/documentation/master/administration/on_premise/geo_ip.html

About This Solution

This article focuses on implementing automatic website currency selection based on the visitor's country using Odoo's built-in GeoIP functionality. It assumes that GeoIP has already been configured according to the official Odoo documentation and covers only the additional steps required to integrate GeoIP with website pricelists through a custom module.