This module allows add a unique constraint to partner ref field.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Lets you force partner references to be unique, either for all partners or only for companies, with the rule set per company.
This module adds a setting on the company form that controls whether partner references must be unique. On the company record, in the Partners group, you choose between None, Only companies, or All partners.
When the rule is active, Odoo checks the reference field on partners and blocks saving if another partner already uses the same reference, showing an error naming the conflicting partner. The check runs when the reference, the company, or the is_company flag changes.
- With Only companies, the uniqueness applies only to partners marked as companies.
- With All partners, it applies to every partner with a reference.
- The rule is read from the partner's company, or from the current company if the partner has none.
The module also adjusts the partner merge wizard so that merging contacts does not fail because of this uniqueness rule; during a merge the check is skipped.
It touches the company settings screen and the partner records, and it works together with the standard partner merge tool.
Depends on
Models and fields (3)
- res.company · extends an existing modelpartner_ref_unique (Unique partner reference for)
- res.partner · extends an existing model
- base.partner.merge.automatic.wizard · extends an existing model
Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 8 confirmed, 1 with no information of 9 versions.
Sources · Odoo 19.0
Confirmed on 2026-11-03 in branch 19.0 of OCA/partner-contact.
terminal Installation and usage
OCA documentation · Odoo 19.0Configuration
Source · Odoo 19.0To configure this module, you need to:
- Go to Settings \> Users & Companies \> Companies.
- Select a company.
- Choose an option on section Partners.
Usage
Source · Odoo 19.0- Go to any partner in Contacts \> Contacts
- Try to create two partners with the same ref.
- If you selected the option 'All partners', you can't create two partners with the same ref.
- If you selected the option 'Only companies', you can't create two companies with the same ref.
- If you selected the option 'None', you can create two partners with the same ref.
No verified information in OCA: Installation.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.