OdooWiki OCA HUB

Partner Relations

partner_multi_relation folder_open OCA/partner-contact open_in_new
Customer Relationship Management License: AGPL-3

This module aims to provide generic means to model relations between partners.

Examples would be 'is sibling of' or 'is friend of', but also 'has contract X with' or 'is assistant of'. This way, you can encode your knowledge about your partners directly in your partner list.

auto_awesome What this module does

AI-generated from the code · Odoo 19.0

Record and manage relationships between contacts, such as 'is sibling of' or 'works for', with types, validity dates and automatic inverse names. Search contacts by their relations and see a Relations counter on the contact form.

This module adds a way to link contacts to each other with a named relationship. You first define relationship types (for example 'is sibling of' with its inverse 'is sibling of', or 'works for' with inverse 'works at'), then create relations between two contacts.

Where it appears: - A new 'Relations' menu under Contacts, with 'Relations' and 'Relation Types' entries. - On every contact form, a 'Relations' stat button showing how many active relations the contact has; clicking it opens the list of that contact's connections. - In the Contacts search bar, new filters: 'Has relation of type', 'Has relation with', 'Relation valid' (a date) and 'Has relation with a partner in category'.

Business rules and automatic behaviour: - Each relation type can restrict the left and right side to organisations or persons, and to a partner category. - A type can be marked 'Reflexive' (a contact may relate to itself) or 'Symmetric' (the right side automatically copies the left side settings and the inverse name). - Start and end dates define validity; the end date cannot be before the start date, and overlapping relations of the same type between the same two contacts are refused. - When you change a relation type's criteria, you choose what happens to existing relations that no longer fit: block the change, keep them, end them today, or delete them. - Relations are shown with the inverse wording when viewed from the other contact.

It touches res.partner, res.partner.relation and res.partner.relation.type. Only partner managers can create or edit relations; sales managers manage relation types.

Depends on

contactssales_team

Menus it adds

Relationsmenu_res_partner_relation_simpleRelation Types
Models and fields (3)
  • res.partner · extends an existing modelrelation_count, relation_left_ids (Left relations with current partner), relation_right_ids (Right relations with current partner), search_relation_date (Relation valid), search_relation_type_id (Has relation of type), search_relation_partner_id (Has relation with), search_relation_partner_category_id (Has relation with a partner in category)
  • res.partner.relation · new modelactive, type_id (Type), date_end (Ending date), date_start (Starting date), any_partner_id (Partner), type_id_domain, left_partner_id (Source Partner), this_partner_id, type_id_display, other_partner_id, right_partner_id (Destination Partner), left_partner_id_domain, right_partner_id_domain
  • res.partner.relation.type · new modelname, allow_self (Reflexive), is_symmetric (Symmetric), name_inverse (Inverse name), left_partner_type (Left partner type), right_partner_type (Right partner type), handle_invalid_onchange (Invalid relation handling), left_partner_category_id (Left partner category), right_partner_category_id (Right partner category)

Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. The module is very large and only part of the code was read. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation 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.0

Relation Types

Before being able to use relations, you'll have define some first. Do that in Contacts / Relations / Partner relations.

A relation type has a name for both sides.

To have an assistant-relation, you would name one side 'is assistant of' and the other side 'has assistant'.

Partner Types

The Partner Type fields allow to constrain what type of partners can be used on the left and right sides of the relation.

  • In the example above, the assistant-relation only makes sense between people, so you would choose 'Person' for both partner types.
  • For a relation 'is a competitor of', both sides would be companies.
  • A relation 'has worked for' should have persons on the left side and companies on the right side.

If you leave these fields empty, the relation is applicable to all types of partners.

Partner Categories

You may use categories (tags) to further specify the type of partners.

You could for example enforce the 'is member of' relation to accept only companies with the label 'Organization' on the right side.

Reflexive

A reflexive relation type allows a partner to be in relation with himself.

For example, the CEO of a company could be his own manager.

Symmetric

A symetric relation has the same value for the left and right sides.

For example, in a competitor relation, both companies are competitors of each other.

Invalid Relation Handling

When the configuration of a relation type changes, some relations between 2 partners may become invalid.

For example, if the left partner type is set to Person and a relation already exists with a company on the right side, that relation becomes invalid.

What happens with invalid relations is customizable on the relation type.

4 possible behaviors are available:

  • Do not allow change that will result in invalid relations
  • Allow existing relations that do not fit changed conditions
  • End relations per today, if they do not fit changed conditions
  • Delete relations that do not fit changed conditions

Searching Partners With Relations

To search for existing relations, go to Contacts / Relations / Relations.

To find all assistants in your database, fill in 'assistant' and autocomplete will propose to search for this type of relation.

Now if you want to find Colleen's assistant, you fill in 'Colleen' and one of the proposals is to search for partners having a relation with Colleen.

Searching Relations From Partner View

A smart button is available on the partner form view to display the list of relations.

No verified information in OCA: Installation, Configuration.

info

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.