Skip to content

[19.0][ADD] res_company_representative: new module - #1056

Open
NICO-SOLUTIONS wants to merge 1 commit into
OCA:19.0from
NICO-SOLUTIONS:19.0-add-res_company_representative
Open

NICO-SOLUTIONS wants to merge 1 commit into
OCA:19.0from
NICO-SOLUTIONS:19.0-add-res_company_representative

Conversation

@NICO-SOLUTIONS

@NICO-SOLUTIONS NICO-SOLUTIONS commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

This Odoo module allows you to manage company representatives and their representative roles.

A representative is a contact (res.partner) assigned to a specific company and representative role. This relationship is managed separately from the partner's parent contact, as a contact being associated with a company does not necessarily mean that they represent the company.

The structured representative data can be used by other modules, for example to display representatives and their roles in external reports or documents.

Features:

  • Assign contacts as representatives to companies.
  • Assign a representative role to each representative.
  • Manage representative roles centrally.
  • Define the display order of representatives.
  • Define representative sequences per company.
  • Prevent duplicate representatives for the same company.
  • Display representatives and their roles on the company form.
  • Allow the same contact to represent multiple companies independently.

@OCA-git-bot OCA-git-bot added series:19.0 mod:res_company_representative Module res_company_representative labels Sep 10, 2026
@NICO-SOLUTIONS
NICO-SOLUTIONS marked this pull request as ready for review September 10, 2026 18:59
@NICO-SOLUTIONS

Copy link
Copy Markdown
Member Author

@CRogos
Would you mind reviewing this one when you have some time?

@CRogos CRogos left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor suggestions.

Comment thread res_company_representative/data/data.xml
Comment thread res_company_representative/models/res_company_representative.py
Comment thread res_company_representative/tests/test_res_company.py Outdated
@NICO-SOLUTIONS
NICO-SOLUTIONS force-pushed the 19.0-add-res_company_representative branch from 2512fac to baba4c7 Compare September 11, 2026 10:22
@NICO-SOLUTIONS

NICO-SOLUTIONS commented Sep 14, 2026 •

Copy link
Copy Markdown
Member Author

@smaddlsoft
Maybe You can have a Look here as well? As this is the next step to include it in 5008...

@smaddlsoft smaddlsoft left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally, LGTM.

But: Could you make more explicit here and in the readme what the purpose/use case/possible application (e.g. reports) is and why the standard way of child contacts and using the field position is not enough, or why you think its better outside of the res.partner form but instead in the way you have proposed?

@NICO-SOLUTIONS

Copy link
Copy Markdown
Member Author

Functionally, LGTM.

But: Could you make more explicit here and in the readme what the purpose/use case/possible application (e.g. reports) is and why the standard way of child contacts and using the field position is not enough, or why you think its better outside of the res.partner form but instead in the way you have proposed?

@smaddlsoft
Thanks for the feedback. I’ll make this a bit more explicit in the README.

Actually, this approach cannot really be modeled properly using res.partner child contacts and the standard position field. One main use case is having structured representative data available (e.g. for external reports/documents), independently of the partner’s parent contact.
The representative is still a res.partner, but being a representative is a relationship to a specific res.company and role — which is why I think it makes sense to keep it on res.company rather than on the partner itself.

This also allows multiple representatives per company and the same partner to represent different companies independently. Pretty much the reason for the separate model in the first place 😉

This Odoo module allows you to manage company representatives and their
representative roles.

A representative is a contact (res.partner) assigned to a specific company
and representative role. This relationship is managed separately from the
partner's parent contact, as a contact being associated with a
company does not necessarily mean that they represent the company.

The structured representative data can be used by other modules, for example
to display representatives and their roles in external reports or documents.

Features:
- Assign contacts as representatives to companies.
- Assign a representative role to each representative.
- Manage representative roles centrally.
- Define the display order of representatives.
- Define representative sequences per company.
- Prevent duplicate representatives for the same company.
- Display representatives and their roles on the company form.
- Allow the same contact to represent multiple companies independently.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:res_company_representative Module res_company_representative series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants