Auto Country for Website Customers Based on Rules with GeoIP
by Alwinen GmbH https://www.alwinen.de$ 57.39
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Website (website)
• Discuss (mail) |
| Lines of code | 110 |
| Technical Name |
alw_website_partner_default_country |
| License | OPL-1 |
| Website | https://www.alwinen.de |
| Versions | 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Website (website)
• Discuss (mail) |
| Lines of code | 110 |
| Technical Name |
alw_website_partner_default_country |
| License | OPL-1 |
| Website | https://www.alwinen.de |
| Versions | 18.0 19.0 |
Website Partner Auto Country Assignment Based On Rules with GeoIP
Automatically assign countries to website-created partners using intelligent GeoIP detection
Smart country assignment when creating partner at website based on rules
Stop losing valuable customer data! When visitors register on your website or complete express checkout, their partner records need country information. This module ensures every website-created partner has a country assigned automatically:
- GeoIP Detection: Automatically detect visitor's country based on their IP address
- Designated Country: Set a default country for your primary market or region
- Company Country Fallback: Use your company's country as the ultimate fallback
- Priority-Based Logic: Intelligent cascading system tries methods in order until country is found
- Enhanced user experience: Country is assigned automatically, eliminating the need for users to manually select from an extensive dropdown list
Why Do You Need This Module?
The Challenge:
Odoo's website registration and express checkout only collect minimal information (email and password). Partners created this way have no country data, leaving critical gaps in your customer database.
The Problem:
Missing country data breaks reporting, analytics, and geo-segmentation. Payment providers like Stripe may reject transactions. Tax calculations become unreliable. Your business intelligence suffers.
The Solution:
This module automatically assigns countries using intelligent detection. GeoIP identifies visitor location, with smart fallbacks ensuring every partner gets country data for perfect database quality.
Key Features for Perfect Data Quality
🌍 GeoIP Country Detection
Leverage GeoLite2 databases to automatically detect visitor countries by IP address. The most accurate method for international websites with visitors from multiple countries.
🎯 Designated Country Option
Set a specific default country for your primary market. Perfect for single-country stores or when you know most customers come from one region.
🏢 Company Country Fallback
Use your company's country as ultimate fallback. Ensures every partner record has country data even when GeoIP isn't available or designated country isn't set.
🔄 Priority-Based Cascading
Intelligent priority system tries GeoIP first, then designated country, then company country. The first successful detection wins, ensuring optimal accuracy.
🌐 Multi-Website Support
Full support for multiple websites. Each website can have different country assignment rules - perfect for regional sites targeting different markets.
⚡ Zero User Friction
Works completely behind the scenes. Users don't see any changes to registration or checkout flows. Country is silently assigned during partner creation.
Easy Setup in 3 Steps
|
1
|
Step 1: Install GeoIP Databases (Required for GeoIP detection)It is recommended to take the GeoIP database from Maxmind. Install GeoIP databases for automatic country detection:
Configure Add to For more details, please refer to the Odoo documentation. |
|
2
|
Step 2: Configure Country Assignment RulesNavigate to:
Enable "Assign Country to New Partner" Select your preferred methods: GeoIP, designated country, or company country |
|
✔
|
Step 3: Done - Perfect Data Quality Achieved!Website registrations and express checkouts now automatically assign countries Every partner record has country data for perfect reporting, analytics, and payment processing |
Frequently Asked Questions (FAQ)
How accurate is GeoIP country detection?
GeoLite2 databases provide 99%+ accuracy for country-level detection. They're maintained by MaxMind and updated regularly. Even with occasional misses, the designated country and company country fallbacks ensure 100% data coverage.
Will this override countries users manually enter?
No! The module only assigns countries when none is provided. If a user manually enters their country in any form field, that value is respected and never overridden.
Does this work without GeoIP databases?
Absolutely! While GeoIP provides the most accuracy, you can use designated country or company country without any GeoIP setup. The module simply skips GeoIP detection and moves to the next priority level.
Can each website have different country assignment rules?
Yes! Each website can configure its own rules. Perfect for multi-website setups where:
- Regional sites target specific countries (e.g., mystore.de always assigns Germany)
- International sites use GeoIP for global visitors
- B2B sites use company country while B2C sites use GeoIP
What happens if all three methods fail?
In practice, this never happens. As long as your company has a country set (which Odoo requires during setup), the company country fallback always succeeds. But even if it did fail, the partner is still created normally - just without country data (same as default Odoo behavior).
Does this affect partner creation outside the website?
No! The module only activates for website-created partners. Partners created through backend forms, imports, APIs, or other modules are completely unaffected.
Will this help with Stripe payment issues?
Yes! Many payment providers like Stripe require or strongly recommend country data for fraud detection and compliance. Missing countries can cause payment failures or increased fees. This module ensures all partners have country information.
Does this work with Odoo Community and Enterprise?
Yes! The module works with both Odoo Community and Enterprise editions.
Your Benefits at a Glance
Real-World Use Cases
🎫 Event Ticket Sales
Express checkout for digital tickets collects minimal info. This module ensures every attendee has country data for analytics, tax compliance, and attendee demographics reporting.
🛍️ International E-Commerce
Multi-country stores need accurate country data for shipping, tax calculations, and payment processing. GeoIP detection ensures customers from any country get proper country assignment.
📚 SaaS & Digital Products
Software subscriptions and digital downloads don't need shipping addresses, so country data often goes missing. Essential for compliance, tax, and customer segmentation.
🌍 Regional Websites
Domain-based regional sites (mystore.de, mystore.fr) can use designated country to automatically assign the correct country based on which site the visitor uses.
💳 Payment Processing
Stripe and other payment gateways use country data for fraud detection and fee calculation. Missing country information can cause payment failures or higher processing fees.
📊 Marketing & Analytics
Country-based segmentation for email campaigns, A/B testing, and customer analysis requires complete country data. No more "Unknown" or empty values in your reports.
Support & Contact
For questions, customization requests, or technical support, please contact us. We'd be happy to help you out.
Email Support:
info@alwinen.de
Developed by Alwinen GmbH
Professional Odoo Solutions
https://www.alwinen.de
Copyright © Alwinen GmbH | Licensed under Odoo Proprietary License v1.0
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module