res_partner_many2one
Type three letters into a customer field and Odoo suggests real companies with their logo, address and VAT. That is res_partner_many2one: a standard many2one wrapped with Odoo's company autocomplete service. It lives in a module most people have never looked at.
| Technical name | res_partner_many2one |
|---|---|
| Field types | many2one (to res.partner) |
| Views | form, list |
| Module | partner_autocomplete (auto-installed, depends on iap_mail) |
| Used in core | 20 occurrences across 10 modules, including crm, project, fleet, sale_project, account, payment |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | Partly. Core partner fields ship with it; Studio's generic Many2One properties (Disable creation, Typeahead search) apply to it |
| Alternatives | many2one, many2one_avatar, many2one_avatar_user |
What the Partner Autocomplete field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
no_create | boolean | Blocks creating partners from the field, and with it the entire IAP suggestion source: the dropdown shows only database matches. Studio calls this Disable creation.(default: false) |
no_quick_create | boolean | Removes the inline Create "..." shortcut but keeps the full create dialog, so IAP suggestions keep working through their prefilled dialog.(default: false) |
no_create_edit | boolean | Removes the Create and edit... entry that opens the empty create dialog from typed text.(default: false) |
no_open | boolean | Disables opening the selected partner from the field (the internal link in readonly and the arrow button). Studio calls this Disable opening.(default: false) |
search_threshold | integer | Minimum typed characters before the database search runs; without it the search fires on focus. The IAP source has its own fixed three-character threshold regardless of this option. |
placeholder_field | field name | Reads the placeholder text from another char field on the record. |
create_name_field | field name | Read by extractM2OFieldProps but absent from the declared options: names the field on the target model that receives the typed text on quick create (default is name). |
can_scan_barcode | boolean | Read by extractM2OFieldProps but absent from the declared options: enables barcode scanning input for the field on mobile.(default: false) |
no_create disables more than creation here. The source builds the IAP suggestion source only when the field allows creating records, so options="{'no_create': True}" (or a can_create="False" attribute) silently removes the company autocomplete as well. If suggestions are missing, check this first.
Working examples
What happens between keystroke and record
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. No changes on the development branch beyond the framework rewrite; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source of partner_autocomplete and web. |
| Odoo 18.0 | Verified | Same registration and behavior; file differs only in internals. Verified against the 18.0 source. |
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| No company suggestions appear | Fewer than three characters typed, creation is blocked on the field (no_create or can_create), or the IAP service is unreachable. Type at least three characters and check the field allows creation; the suggestion source is built only when it does. |
| Console warning Missing widget: res_partner_many2one | The partner_autocomplete module is not installed, so the name is not in the fields registry. Install (or reinstall) partner_autocomplete; until then Odoo renders the plain many2one, which is functional but has no autocomplete. |
| Picking a suggestion opens a dialog instead of filling the field | By design: the widget prefills the create dialog for review rather than creating the partner silently. Nothing to fix. Save the dialog to create and link the partner. |
| Suggestions show companies from the wrong country | The worldwide search mode queries without a country filter (country id 0). Use the normal mode for local search; in worldwide mode the country name is appended to each suggestion to tell them apart. |
| A person record was created as a company | The widget forces default_is_company on records created from suggestions; the service only suggests companies. Create individuals by typing their name and using quick create, not the suggestion list. |
Partner Autocomplete field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
res_partner_many2one | Customer and vendor fields where records get created during entry | Adds an external company data source and a prefilled create dialog to the standard many2one |
many2one | Any relation where external company lookup adds nothing | Same field, no IAP suggestion source |
| many2one_avatar | Partner fields where the avatar matters more than data entry | Shows the partner image, no autocomplete service |
| many2one_avatar_user | Internal user assignment fields | res.users oriented, avatar plus quick assignment interactions |
Frequently asked questions
Where does res_partner_many2one get its company data?+
Why does my view log Missing widget: res_partner_many2one?+
Does using this widget cost anything?+
Can I keep the autocomplete but stop users creating partners?+
Does it work on fields pointing at models other than res.partner?+
Can I search by VAT number?+
Is your partner database full of duplicates?
Autocomplete at entry is half the answer; the other half is cleaning what is already there. We deduplicate res.partner at scale, merge histories safely, enforce VAT and address quality rules, and tune CRM entry screens so good data is the path of least resistance.
Book a free consultation