Home Blog How To Show Geolocation Based Pricelist
How To Show Geolocation Based Pricelist

How To Show Geolocation Based Pricelist?

Odoo is one of the most fastest growing ERP based open source software. Most businesses cater to Odoo due to its ability to provide all the features required at one place.

In today's world, almost 75-80% of the data can be attached to a location and can be displayed on a map. Odoo also allows to manage all the business data of a company location wise. In the latest upgrade of Odoo version 13, we can see that the contact address is displayed on a map.

Contact Address is Displayed on a Map: Odoo 13

This is possible because of the use of Geolocation in Odoo. So "What is Geolocation?

According to wikipedia, "Geolocation is the identification or estimation of the real-world geographic location of an object, such as a radar source, mobile phone, or Internet-connected computer terminal. 

In its simplest form, geolocation involves the generation of a set of geographic coordinates and is closely related to the use of positioning systems, but its usefulness is enhanced by the use of these coordinates to determine a meaningful location, such as a street address".

In Odoo, there can be worldwide customers of a company. So, it is very important to generate pricelists for these customers according to the location.

 Don't miss out on Odoo ERP tips and news. Join our Subscriber list today!

In this blog, we will see how we can configure pricelists based on geolocation in Odoo 13. We'll also see how to install and configure GEO IP package in ubuntu server.

The below configuration is being done in a linux based operating system. We have used Ubuntu 18.04 LTS version.

So let's see how we can install the GEOIP package on our system.

1. Download GeoLite2 City: Firstly, you have to download the GeoLite2 City database from MaxMind. Here, you have to signup/login in MaxMind. After login You will see Download database. Click on it.

Install the GEOIP package on System

Next scroll down, you see GeoLite2 City. Click on Download GZIP.

Install the GEOIP package on System

Once you downloaded, extract it.

2. Upload to Server

Secondly, you have upload extracted file .mmdb to your server. And move this file to the folder /usr/share/GeoIP/ location.

mv /home/ubuntu/GeoLite2-City.mmdb /usr/share/GeoIP/

3. Add Into Configuration File

Using following command open Odoo Configuration file.

$ sudo nano /etc/odoo12-server.conf

$ sudo nano /etc/odoo12-server.conf

Add following line in configuration file.

geoip_database = /usr/share/GeoIP/GeoLite2-City.mmdb

Save it and close the file. After updating you need to restart your Odoo Server.

Now, after we have installed the GEOIP Package, let's test this package.


Test GEOIP Package

1. Go into your Odoo Website Homepage. On Top Panel Choose Customize -> HTML/CSS/JS Editor.

Test GEOIP Package

2. Add the following line in XML. Save and Close it.

<p t-esc="request.session.get('geoip')"/>

Test GEOIP Package

3. After Reloading Page you will see Python Dictionary come up with your Local Geo IP.

Test GEOIP Package

Odoo Configuration

Finally, GeoIP working find on our website. Next we have Configure Odoo Pricelist base on Geo-Location.

1. First of all we have to enable the Multi-Pricelist feature of Odoo:

Go to sale > Configuration > Settings. Here, Enable Multiple Prices Per Product > Save Changes.

Configure Odoo Pricelist base on Geolocation

2. Create Multiple Pricelists:

Open Pricelist List View. Go to Sale > Product > Pricelist.

Configure Odoo Pricelist base on Geolocation

3. Create Country Group:

First, Navigate to Contacts > Configuration > Country Group. Create/Update country and country group as per you need.

Configure Odoo Pricelist base on Geolocation

Now save it. Pricelist is now configured as per geoip location wise. Now, when any customer opens your Odoo ecommerce website, the pricelist for that customer will be active based on the customer's Geo IP. You can also configure multi currencies base on different pricelist.

Let us see how we can enable multi-currency in Odoo: Navigate to Users > Admin.

1. Enable Multi-Currency from Admin's Settings.

Configure Odoo Pricelist base on Geolocation

2. Next we have to Enable Currencies in the System:

Go to Invoicing > Accounting > Currencies

Configure Odoo Pricelist base on Geolocation

Here, you can Activate the Currencies that Required.

Configure Odoo Pricelist base on Geolocation

3. Go to Pricelist select Currency: Next go to Pricelist and select Currency.

Configure Odoo Pricelist base on Geolocation

Conclusion


Using geolocations for partners will help in hassle-free maintenance of pricelist’s for customers. Maintaining pricelist’s for customers according to their areas will increase the product appealing to your customers.


Geographical pricing helps us in earning more in certain situations reducing some extra costs. Geographical pricelist management involves adding extra layers of price management because we need to keep track of our product prices in different regions.


Using the steps mentioned in this blog, we have learned how to configure the GeoIP package in our server and then we'll test how it works. If it works successfully, we have configured the pricelist based on customer's geolocation. and following above-mentioned steps, we can show multi-currencies based on pricelist using customers locations.

Hire Odoo Developer today to get your Customization Done at affordable Price

Get in touch wit​h us!

Protected by reCAPTCHA, Privacy Policy & Terms of Service apply.
Leave a Comment

Your email address will not be published.

Submit
Your comment is under review by our moderation team.