Warning: include_once(/home/favoledo/robertozanardo.com/wp-content/sunrise.php): Failed to open stream: No such file or directory in /home/favoledo/robertozanardo.com/wp-includes/ms-settings.php on line 52

Warning: include_once(): Failed opening '/home/favoledo/robertozanardo.com/wp-content/sunrise.php' for inclusion (include_path='.:/opt/alt/php83/usr/share/pear:/opt/alt/php83/usr/share/php:/usr/share/pear:/usr/share/php') in /home/favoledo/robertozanardo.com/wp-includes/ms-settings.php on line 52
Solving Odoo Multicompany Access Rights Issue on Contact Model - Odoo e Soluzioni Open Source

Solving Odoo Multicompany Access Rights Issue on Contact Model

Managing multiple companies in Odoo can be a complex task, especially when it comes to setting access rights and permissions. A common problem many Odoo users face is that the default permissions on the contact model (res.partner) do not allow access to users managed companies, even if they have the relevant companies selected in their company_ids settings. This blog post will guide you through a solution to this issue by modifying the default permission rules.

The Problem

By default, Odoo sets the following domain on the contact model to control access rights:

['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]

This domain restricts access to contacts in the following ways:

  1. Contacts belonging to the user’s company or its child companies.
  2. Contacts with no company specified (shared contacts).

However, this does not consider other companies that the user might have access to via the company_ids field in their user settings. As a result, users cannot see contacts from these companies, which is not the desired behavior in a multicompany setup.

The Solution

To solve this problem, we need to extend the default domain to include companies listed in the user’s company_ids. The revised domain is as follows:

['|','|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False),('company_id', 'in', [company.id for company in user.company_ids])]

This updated domain includes an additional check that allows access to contacts from any of the companies specified in the user’s company_ids.

Conclusion

By modifying the default permission rules, you can ensure that users have access to contacts from all companies they are associated with in a multicompany setup. This small adjustment can greatly enhance the usability and efficiency of Odoo in a multicompany environment.

By following the steps outlined above, you can solve the access rights issue and ensure a smoother experience for users managing contacts across multiple companies. If you have any questions or run into any issues, feel free to leave a comment below!

Thanks to this post for drive me to the right direction!

https://www.odoo.com/it_IT/forum/assistenza-1/multicompany-access-rights-why-is-the-field-res-user-company-ids-not-used-43842

Lascia un commento

kolaybet giriş
kolaybet
betgaranti
Kolaybet
kolaybet
bettilt
grandpashabet
Kolaybet
grandpashabet
kolaybet
betpark
betgaranti
betpark
betgaranti
kolaybet
kolaybet
betpark
betpark
betgaranti
betgaranti 2026
hellocasino
betgaranti 2026
betgaranti
betgaranti 2026
Kolaybet 2026
Kolaybet
Kolaybet Mobil Giriş
Kolaybet Güncel Giriş
bettilt
vdcasino
betpark
betpark
betgaranti
betgaranti 2026
betgaranti güncel giriş
betgaranti mobil giriş
kolaybet
Kolaybet
Kolaybet Giriş
Kolaybet Güncel Giriş
Kolaybet 2026
Kolaybet
Kolaybet Güncel Giriş
Kolaybet 2026
Kolaybet Güncel Giriş
Kolaybet Giriş
grandpashabet
betpark
betpark
bettilt
kolaybet
kolaybet giriş
sahabet
sahabet
onwin
onwin
sahabet
sahabet
onwin
onwin
grandpashabet
kolaybet
betpark
betgaranti
kolaybet güncel giriş
kolaybet giriş
kolaybet
kolaybet resmi giriş
kolaybet mobil giriş
Kolaybet 2026
Kolaybet Giriş Güncel
Kolaybet Güncel Giriş
Kolaybet Giriş
Kolaybet
Kolaybet Telegram
Kolaybet Resmi Giriş
Kolaybet Giriş
Kolaybet 2026
betpark
betpark
holiganbet
Kolaybet
Kolaybet
vdcasino
Betgaranti
matbet güncel giriş
matbet güncel giriş
matbet güncel giriş
matbet güncel giriş
betgaranti
betgaranti
betgaranti
sahabet
sahabet
kolaybet
kolaybet