The Odoo CMS has built-in support for the GeoIP. In the live environment, you can track a visitor's country based on IP. In this recipe, we will get the country of the visitor based on the visitor's IP address.
Getting a visitor's country information
Getting ready...
For this recipe, we will be using the my_library module from the previous recipe. In this recipe, we will hide some books on the web page based on the visitor's country. You will need to download the GeoIP database for this recipe. After that, you will need to pass the database location from the cli option, like this:
./odoo-bin -c config_file --geoip-db=location_of_geoip_DB