google_address_autocomplete
This widget turns a street field into a Google Places search that fills the whole address block. Its seven field-mapping options are what make it usable on a model that does not name its fields the way res.partner does.
| Technical name | google_address_autocomplete |
|---|---|
| Field types | char |
| Views | form |
| Module | google_address_autocomplete, an optional module that needs a Google Places key |
| Used in core | 0 uses in Odoo 19 Community or Enterprise. It is applied by the module's own configuration rather than by a standard view. |
| Versions | Odoo 19.0, Odoo 20.0 |
| No-code setup | No. The module is configured in Settings, but the widget itself has no Studio entry. |
| Alternatives | field_partner_autocomplete, char |
What the google_address_autocomplete widget does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
street | field name | Field that receives the street line. Must be a char field and must be present in the view.(default: street) |
street2 | field name | Field for the additional street line. Char field.(default: street2) |
city | field name | Field for the city name. Char field.(default: city) |
state_id | field name | Field for the state or province. Accepts char or many2one; a many2one receives a real record reference rather than text.(default: state_id) |
zip | field name | Field for the postal code. Char field.(default: zip) |
country_id | field name | Field for the country. Accepts char or many2one; a many2one receives a real record reference.(default: country_id) |
city_id | field name | Field for a city record, used by localizations that store cities as their own model. Many2one only.(default: city_id) |
Two behaviors that are not in any option list. First, the widget only writes to fields present in the view's active fields, so a mapping that points at a field you forgot to place is skipped without a warning. Second, any address part it could not place is joined with spaces and written into the widget's own field, so a partial mapping produces a cluttered street line rather than lost data.
Working examples
Why a mapped field sometimes never gets filled
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 19.0 | Verified | Verified against the shipped 19.0 source. |
| Odoo 20.0 | Verified | Verified against the 20.0 branch. No changes. |
Unchanged between the two branches we checked.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| One address field never gets filled | The mapped field is not in the view, so it is not in activeFields and the widget skips it. Add the field to the form. invisible="1" is fine; it only needs to be loaded. |
| The street line fills with the entire address run together | Address parts with nowhere to go are joined and written into the widget's own field. Complete the mapping so every part has a destination field in the view. |
| Nothing happens as the user types | Search only fires above five characters. Type more of the address. This is a deliberate threshold, not a fault. |
| No suggestions at all | No Google Places key configured, or the module is not installed. Configure the key in Settings and confirm google_address_autocomplete is installed. |
Google_address_autocomplete widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
google_address_autocomplete | Filling a whole address block from a Google Places search | Maps seven address parts onto your own field names, but only writes fields present in the view |
| field_partner_autocomplete | Filling a company record from a name | Searches companies in Odoo's enrichment service, not addresses in Google |
| char | A manually typed address | No lookup, no API key and no cost |
Frequently asked questions
Why does one address field stay empty after selecting a Google suggestion?+
Can I use Odoo's Google address autocomplete on a model other than res.partner?+
How many characters before Odoo searches Google for an address?+
Why is my street field filling with the whole address?+
Addresses arriving wrong from every channel?
Autocomplete fixes the form, not the imports, the portal or the integration that also create partners. We standardize address capture across every route into your database, so shipping and tax stop arguing with each other.
Talk to an Odoo consultant