This question has been flagged

I am setup my Odoo 13 community as a multi-companies environment.

There are totally 7 companies defined for this setup.

In one of the 7 ( and only 1 ) companies, there happened the same error as captioned when using some of the functions e.g. create invoice, post to journal, etc, so cannot create invoice, cannot post, etc.

The error is 

---

The requested operation ("read" on "Contact" (res.partner)) was rejected because of the following rules: - res.partner company 

Note: this might be a multi-company issue. 

(Records: Company A (id=36), User: Administrator (id=2))

---

the said rule is

['|', '|', ('partner_share', '=', False), ('company_id', 'in', company_ids), ('company_id', '=', False)]

By deactivate this rule, thing working but I want this in place as I don't want share contacts/data among all 7 companies. I want access control to data.

How should I interpret this rule? 

Because rule applied to all 7 companies of this setup, it's a global rule, if other companies without the same issue, the issue should be with this specific company_id?

I would guess all 3 conditions of this rule False, but how could I troubleshoot the cause behind? is there something missing to configure for this company_id?

Avatar
Discard
Author

from https://odootricks.tips/about/building-blocks/odoo-multicompany/multicompany-in-odoo-13/, i found a description about the rule.

There is now a Global Record Rule for Contacts (res.partner):

['|', '|',
('partner_share', '=', False),
('company_id', 'in', company_ids),
('company_id', '=', False)]

partner_share is TRUE for Odoo internal users but not for portal users or other partners (e.g. customers and suppliers).

This means that:

Customers and suppliers are filtered by the multi-company rules
Internal Users in one company are visible in other companies

However, looks not related to the issue came across, could you share any idea?