Comment 5 for bug 1090049

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hello,

As far as I can tell this is not a bug, but the expected behavior with the default OpenERP configuration, especially when the two companies are unrelated (not a parent of each other)

Here is how multi-company works in OpenERP:
- a user can only see documents that belong to the company that is currently set as their "main company" in their user preferences or to a child company, plus documents that do not belong to any company (it actually depends on the security rules configured for that kind of document, but this is the normal behavior) ;
- the list of "allowed companies" for a user should *only ever* be used to let the user switch companies in their user preferences, and never to decide which documents should be visible to the user.

So when users have several companies in their "allowed companies", that does not mean they will see documents from all these companies all the time. They must only see the documents from their currently selected company (and its child companies). If they want to start seeing documents from another company, their have to switch their current company in their user preferences.

In a nutshell, a user who belongs to several companies has to choose in which company context they want to work, at all time, and they cannot mix these contexts.
This is critical to ensure that OpenERP stays usable in multi-company mode, otherwise users would mix data from different companies all the time, causing countless errors: for example when you have to select the value for a field (say, a product or a fiscal period) it's not easy to tell which possible value belongs to which company.