Skip to main content
iVentureTeam

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.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 12, 2026Updated August 12, 20265 min read
Odoo 19 partner field with the res_partner_many2one widget showing IAP company suggestions with logos below the typed text.
Technical nameres_partner_many2one
Field typesmany2one (to res.partner)
Viewsform, list
Modulepartner_autocomplete (auto-installed, depends on iap_mail)
Used in core20 occurrences across 10 modules, including crm, project, fleet, sale_project, account, payment
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0
No-code setupPartly. Core partner fields ship with it; Studio's generic Many2One properties (Disable creation, Typeahead search) apply to it
Alternativesmany2one, many2one_avatar, many2one_avatar_user

What the Partner Autocomplete field does

res_partner_many2one renders a many2one to res.partner exactly like the standard widget, then adds one thing: an extra suggestion source in the autocomplete dropdown, powered by Odoo's IAP partner autocomplete service. Once the user has typed at least three characters, the dropdown grows a section of real-world companies matching the text, fetched from the service, alongside the usual database matches.

Selecting one of those suggestions does not silently create a record. The widget fetches the company's data, name, address, VAT, website, logo, and opens the standard create dialog prefilled with all of it (default_is_company is set, and the logo arrives as the partner's image). The user reviews and saves.

The widget's home surprises people: it is not in web but in partner_autocomplete, a hidden auto-installed module. On a database where that module was removed, view XML naming this widget logs a Missing widget console warning and Odoo falls back to the plain many2one, which is why community CI configs routinely whitelist exactly that warning.

What this means for your team

The quality of your partner database is set in the thirty seconds someone creates a company record. Typed by hand, that record gets a name and maybe an email; everything else is a lookup someone postpones. Picked from autocomplete, it starts life with legal name, address, VAT and website, correct on day one.

The compounding effects are real: deduplication (people pick the suggested spelling instead of inventing variants), invoicing (VAT present before the first invoice, not after a rejection), and outbound (correct country and address feed territory assignment and tax logic). For sales teams doing volume prospecting, the seconds saved per record are the smallest part of the win.

Note the service is an IAP feature: lookups run against Odoo's service with its own quota system. The widget degrades cleanly, no suggestions, plain many2one behavior, when the service is unreachable.

Supported options in Odoo 19

Verified against partner_autocomplete_many2one.js in Odoo 19.0, which builds its descriptor with buildM2OFieldDescription, inheriting the standard many2one surface from many2one_field.js unchanged. The last two rows are read from extractM2OFieldProps and appear in no options panel.

OptionTypeWhat it does
no_createbooleanBlocks 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_createbooleanRemoves the inline Create "..." shortcut but keeps the full create dialog, so IAP suggestions keep working through their prefilled dialog.(default: false)
no_create_editbooleanRemoves the Create and edit... entry that opens the empty create dialog from typed text.(default: false)
no_openbooleanDisables opening the selected partner from the field (the internal link in readonly and the arrow button). Studio calls this Disable opening.(default: false)
search_thresholdintegerMinimum 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_fieldfield nameReads the placeholder text from another char field on the record.
create_name_fieldfield nameRead 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_barcodebooleanRead 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

Standard usage on a partner field

<field name="partner_id" widget="res_partner_many2one"/>

This is how crm, fleet and payment views ship it in core.

Keep autocomplete, block quick create

<field name="partner_id" widget="res_partner_many2one"
       options="{'no_quick_create': True}"/>

Inline creation from typed text is blocked, but IAP suggestions still work because full creation stays allowed, they open the prefilled dialog.

Delay searching on huge databases

<field name="partner_id" widget="res_partner_many2one"
       options="{'search_threshold': 3}"/>

The database search also waits for three characters, matching the IAP behavior, instead of querying on focus.

What happens between keystroke and record

The flow in the source is worth knowing when you debug it.

Three characters, then query. validateSearchTerm requires the text to be longer than two characters before the IAP source fires. Database matches are not held to this rule unless you add search_threshold yourself.

Worldwide search is a second mode. The dropdown's autocomplete component can pass a flag that switches the query to country id 0, searching worldwide instead of your country; in that mode each suggestion's description gains its country name so lookalike companies are distinguishable.

Selection opens a prefilled dialog. The chosen suggestion goes through getCreateData, and everything it returns is mapped to default_ context keys on the create dialog, with default_is_company forced to true and the logo passed as the partner image. Cancel the dialog and the field simply clears; nothing was created behind your back.

VAT numbers work as search terms. The underlying service accepts VAT and GST formats as the query, so pasting a VAT number into the field is a legitimate way to find the company.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. No changes on the development branch beyond the framework rewrite; see below.
Odoo 19.0VerifiedVerified against the shipped source of partner_autocomplete and web.
Odoo 18.0VerifiedSame registration and behavior; file differs only in internals. Verified against the 18.0 source.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The changes below are read from the public development branch and are not final until release.

Nothing changes for this widget beyond the framework. The file is ported to the new Owl props system, the registration name is untouched, and no options are added or removed, in line with the inherited many2one surface, which is also unchanged in our comparison. We re-verify after release.

Common problems and fixes

SymptomCause and fix
No company suggestions appearFewer 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_many2oneThe 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 fieldBy 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 countryThe 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 companyThe 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

WidgetBest forKey difference
res_partner_many2oneCustomer and vendor fields where records get created during entryAdds an external company data source and a prefilled create dialog to the standard many2one
many2oneAny relation where external company lookup adds nothingSame field, no IAP suggestion source
many2one_avatarPartner fields where the avatar matters more than data entryShows the partner image, no autocomplete service
many2one_avatar_userInternal user assignment fieldsres.users oriented, avatar plus quick assignment interactions

Use this widget wherever a partner field mostly receives companies: customers, vendors, transport carriers. Where the field receives people from your own database, assignees, attendees, the avatar variants communicate more per pixel and skip the external lookup entirely.

Frequently asked questions

Where does res_partner_many2one get its company data?+
From Odoo's IAP partner autocomplete service, queried from the third typed character. Suggestions carry name, address, VAT, website and logo, and everything lands in the create dialog as defaults.
Why does my view log Missing widget: res_partner_many2one?+
The widget is registered by the partner_autocomplete module, not web. If that module is absent the registry lookup fails, Odoo logs the warning, and the field falls back to the standard many2one.
Does using this widget cost anything?+
The widget is free; the lookups run through Odoo's IAP service, which meters usage per database. When the service is unavailable the field behaves as a plain many2one.
Can I keep the autocomplete but stop users creating partners?+
No. The source builds the suggestion list only when creation is allowed, because selecting a suggestion must open the create dialog. no_quick_create is the workable middle ground: no inline creation from text, suggestions intact.
Does it work on fields pointing at models other than res.partner?+
The descriptor is a generic many2one build, but the suggestion flow assumes partner semantics (is_company, VAT, logo). Core only uses it on res.partner fields; keep it there.
Can I search by VAT number?+
Yes. The underlying service recognizes VAT and GST formatted queries, so pasting a VAT number into the field finds the company.

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

How this page was produced

This page was verified by reading partner_autocomplete_many2one.js, partner_autocomplete_core.js and the module manifest in the Odoo 19.0 source, plus many2one_field.js in web for the inherited descriptor, including extractM2OFieldProps where the two undocumented options live. The same files were compared on the 18.0 branch and the development branch. The widget's registration home was additionally confirmed with a full-repository code search. Spotted an error or a version difference? Tell us and we will correct the page.