This question has been flagged
3 Replies
7638 Views

I'm trying to configure an Odoo multicompany installation. And I've found what maybe errors, or maybe I'm not configuring correctly something, but I can't figure out what could be wrong.

I have the main company (lets call it Main Company) and another one called Second Company. Main Company is, obviously, the parent company of Second Company.

I create a new user for the Second Company (and only for it) and give it the desired permissions in every module. Once done, when the user logins gets an Access Error. Only logging, no action is neccessary. Is an Access Error related to the res.partner document type and the Operation read.

This error appears repeatedly whenever the new user tries to create, for example, a new lead, opportunities, tasks... even having the maximum permissions for every module, keeps unable to do anything.

Is there any extra configuration neccessary that I'm missing somehow? The steps I took were creating the new company and then the user with its permissions (and assigned to the company) nothing else.

Avatar
Discard
Best Answer

Hi!

As you said, multicompany have a lot of problems, I've been working with multicompany for about a month and I've encountered and solve many issues.

First thing you need to know is that a lot of Record Rules (Security -> Record Rules) are bad, for example the one in res.partner allow you to see your parents partner but not let you read them, so you need to change it in order to fix this.

I'm using this rule for example and work ok : ['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)] .

Second thing, and it looks that this could be your problem, is that user Admin, need to have all the companies in his allowed companies field. This solve other problems for me.

Espero que tengas suerte y te sirva de algo, saludos :D

 

Avatar
Discard
Author

Thanks for your answer. Allowing all the companies to the admin user solved the problem. I saw several rule problems in v7.0 and I suspected that they were here too, but I don't figure out how permissions over a company for the admin user can modify permissions in a user assigned to a child company... I still have to study much more the record rules... Thanks again, muchas gracias ;)

Best Answer

Hi... Im not sure I understand. Ive been working with odoo(open era) since version 6 and there has always been errors and issues with multi-company.. Now we are on version 14. Has anyone had a successful implementation of multi-company. I have had somewhat problem free implementations up to 6 child companies under a parent but when I go to 7 I started getting errors and conflict.  I would love top hear from someone how they were able o configure and implement a problem free implementation of many child companies. I have clients wanting to connect 100s of companies under a parent but I am afraid.. Any help is much appreciated!

Avatar
Discard
Best Answer

Hello,

Jose_M when you say:

... for example the one in res.partner allow you to see your parents partner but not let you read them, so you need to change it in order to fix this.

The rule that you seem to be referring to is a global record access rule:

 {
'name’: 'res_partner: portal/public: read access on my commercial partner’,
'model_id’: [79, 'Partner’],
'domain_force’: "[('id’, 'child_of’, user.commercial_partner_id.id)]",
'perm_create’: False,
'perm_read’: True,
'perm_unlink’: False,
'perm_write’: False}
'active’: True,
}

It seems to be logical than a commercial partner can leave you a contact, but such external user is supposed not to access to your other contacts.

This error can also happen when an internal user belongs to the Portal and Public groups.

The contact access seems to be granted to internal users only.

Avatar
Discard