Google Cloud Address Auto-complete setup procedure
1. Create or select a Google Cloud project
- Open the Google Cloud Console.
- Sign in with your Google account.
- At the top of the page, click Select a project.
- Either select an existing project or click New Project.
- Enter a project name, such as Odoo Address Autocomplete.
- Click Create.
- Make sure the new project is selected before continuing.
2. Attach billing to the project
- Open the navigation menu.
- Go to Billing.
- Link the project to an existing billing account, or create a billing account if necessary.
- Confirm that the project shows an active billing account.
Google Maps Platform requires billing for standard production API access. Charges depend on usage and the specific Google service used.
3. Enable the correct API
- With the correct project selected, open the navigation menu.
- Go to APIs & Services → Library.
- Search for Places API.
- Select Places API.
- Click Enable.
For Odoo 19’s documented integration, select Places API exactly. Do not select Places API (New); Odoo’s documentation says that version is not yet supported by this integration.
4. Create the API key
- Go to APIs & Services → Credentials.
- Click Create credentials.
- Select API key.
- Google displays the new key.
- Copy it temporarily to a secure location.
- Click Edit API key or open the key from the credentials list.
Google’s current API-key procedure requires creating the key from the project’s Credentials page.
5. Restrict the API key to Places API
In the API-key settings:
- Find API restrictions.
- Select Restrict key.
- In the API list, select Places API.
- Do not leave the key unrestricted.
- Click Save.
Google recommends applying both API restrictions and application restrictions to every key.
6. Restrict the key to your Odoo website
For a browser-based Odoo website:
- In the same API-key settings, find Application restrictions.
- Select Websites or HTTP referrers.
- Add every hostname from which Odoo will be used.
For example:
https://example.com/*
https://www.example.com/*
https://staging.example.com/*
If your Odoo database uses a subdomain, add that subdomain too:
https://mycompany.odoo.com/*
Use the actual address users enter in their browser. If both example.com and www.example.com are used, add both. Google identifies HTTP-referrer restrictions as the appropriate restriction type for website and web-app keys.
- Click Save.
Do not use an IP-address restriction for a key used directly by a browser-based Odoo website. IP restrictions are intended for server-side requests; HTTP-referrer restrictions are intended for website requests.
7. Copy the final key
After saving the restrictions:
- Return to APIs & Services → Credentials.
- Open the API key.
- Copy the key shown under Key.
- Do not copy the key ID from the URL; Odoo needs the actual key string.
Keep the key restricted and do not publish it in documentation, screenshots, or public code.
Enter the key in Odoo
After completing the Google steps:
- Open the Settings app in Odoo.
- Go to the Integrations section.
- Enable Google Address Autocomplete.
- Click Save.
- Return to the Integrations section.
- Paste the Google API key into the Google Places API-key field.
- Click Save again.
This is the Odoo 19 procedure documented for connecting the database to Google Places API.
Final configuration checklist
Before testing, confirm:
- The correct Google Cloud project is selected.
- Billing is active for that project.
- Places API is enabled.
- Places API (New) was not enabled instead.
- An API key was created in the same project.
- The key is restricted to Places API.
- The Odoo domain is listed under HTTP-referrer restrictions.
- The key was pasted into Odoo.
- Suggestions appear when typing an address in a supported Odoo address field.
If Odoo returns a “referer not allowed” error, the Odoo hostname is missing or incorrectly entered in the HTTP-referrer restriction. If it returns an API or billing error, check that the key, enabled API, and billing account all belong to the same Google Cloud project.