Reader small image

You're reading from  Odoo 12 Development Cookbook - Third Edition

Product typeBook
Published inApr 2019
Reading LevelIntermediate
PublisherPackt
ISBN-139781789618921
Edition3rd Edition
Languages
Tools
Right arrow
Authors (4):
Parth Gajjar
Parth Gajjar
author image
Parth Gajjar

Parth Gajjar is an Odoo expert with a deep understanding of the Odoo framework. He started his career at Odoo and spent 7 years in the R&D department at Odoo India. During his time at Odoo, he worked on several key features, including a marketing automation app, mobile application, report engine, domain builder, and more. He also worked as a code reviewer and helped manage the code quality of the new features. Later, he started his own venture named Droggol and now provides various development services related to Odoo. He loves working on Odoo and solving real-world business problems with different technologies. He often gives technical training to Odoo developers.
Read more about Parth Gajjar

Alexandre Fayolle
Alexandre Fayolle
author image
Alexandre Fayolle

Alexandre Fayolle started working with Linux and free software in the mid-1990s and quickly became interested in the Python programming language. In 2012, he joined Camptocamp to share his expertise on Python, PostgreSQL, and Linux with the team implementing Odoo. He currently manages projects for Camptocamp and is strongly involved in the Odoo Community Association. In his spare time, he likes to play jazz on the vibraphone.
Read more about Alexandre Fayolle

Holger Brunn
Holger Brunn
author image
Holger Brunn

Holger Brunn has been a fervent open source advocate since he came into contact with the open source market sometime in the nineties. He has programmed for ERP and similar systems in different positions since 2001. For the last 10 years, he has dedicated his time to TinyERP, which became OpenERP and evolved into Odoo. Currently, he works at Therp BV in the Netherlands as a developer and is an active member of the Odoo Community Association.
Read more about Holger Brunn

Daniel Reis
Daniel Reis
author image
Daniel Reis

Daniel Reis has a degree in applied mathematics and an MBA. He has had a long career in the IT industry, mostly as a consultant implementing business applications in a variety of sectors. He has been working with Odoo (OpenERP at the time) since 2010 and is an active contributor to the Odoo Community Association (OCA), where he also serves as a board member. He is the managing director of Open Source Integrators, a leading open source and Odoo consultancy firm.
Read more about Daniel Reis

View More author details
Right arrow

Getting a visitor's country information

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 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
...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Odoo 12 Development Cookbook - Third Edition
Published in: Apr 2019Publisher: PacktISBN-13: 9781789618921

Authors (4)

author image
Parth Gajjar

Parth Gajjar is an Odoo expert with a deep understanding of the Odoo framework. He started his career at Odoo and spent 7 years in the R&D department at Odoo India. During his time at Odoo, he worked on several key features, including a marketing automation app, mobile application, report engine, domain builder, and more. He also worked as a code reviewer and helped manage the code quality of the new features. Later, he started his own venture named Droggol and now provides various development services related to Odoo. He loves working on Odoo and solving real-world business problems with different technologies. He often gives technical training to Odoo developers.
Read more about Parth Gajjar

author image
Alexandre Fayolle

Alexandre Fayolle started working with Linux and free software in the mid-1990s and quickly became interested in the Python programming language. In 2012, he joined Camptocamp to share his expertise on Python, PostgreSQL, and Linux with the team implementing Odoo. He currently manages projects for Camptocamp and is strongly involved in the Odoo Community Association. In his spare time, he likes to play jazz on the vibraphone.
Read more about Alexandre Fayolle

author image
Holger Brunn

Holger Brunn has been a fervent open source advocate since he came into contact with the open source market sometime in the nineties. He has programmed for ERP and similar systems in different positions since 2001. For the last 10 years, he has dedicated his time to TinyERP, which became OpenERP and evolved into Odoo. Currently, he works at Therp BV in the Netherlands as a developer and is an active member of the Odoo Community Association.
Read more about Holger Brunn

author image
Daniel Reis

Daniel Reis has a degree in applied mathematics and an MBA. He has had a long career in the IT industry, mostly as a consultant implementing business applications in a variety of sectors. He has been working with Odoo (OpenERP at the time) since 2010 and is an active contributor to the Odoo Community Association (OCA), where he also serves as a board member. He is the managing director of Open Source Integrators, a leading open source and Odoo consultancy firm.
Read more about Daniel Reis