← Back to team overview

openerp-india team mailing list archive

[Bug 1210263] Re: Permissions users multicompany

 

Hi,

Based on your description and the video linked in it, this does not appear to be a bug, but rather the expected behavior. The way multicompany works is very simple:
  "At any time, a user will see the records that are visible the company
  that is selected in her user preferences"

This is not different for users who work for multiple companies! They do
not see a mix of records from all their companies, they only see the
records for their *current company*. This is very important otherwise
these users would mix records that cannot be mixed, for example they
would be able to select a G/L Account from company A with a Period from
Company B, and they would get errors all the time. The "company_ids" m2m
is only used to set the companies the user can switch to, but *never*
for access control.

This can be confusing in some cases, like the "Inbox" which will mix
messages about both companies, but there is a big warning message about
it already when you switch companies, and it is a very important part to
have a safe multi-company environment.

There are many workarounds for situations where this is too confusing: 
 - create 2 users for the employees working for 2 sister companies, so these users will have 2 completely separate environments -> less confusion for them
 - or change the company hierarchy so that UserAB instead belong to company "Root" which is the parent of A and B. According to your ir.rules this will normally allow UserAB to see records from A and B all the time, but they will have to be 2x more careful to avoid mixing them (+use distinct names for periods, accounts, etc.)
 - or if appropriate, modify the default ir.rules to allow some level of sharing of data between the companies, so that users from company A can see tasks from company B ... in some cases this might make sense on the business side. 
 - or you could even change all the rules to use the `company_ids` field instead of `company_id`, and allow multi-company users to see a mix of records. But that would require users to be very knowledgable about multi-company issues, and it would be very error-prone.
 - etc..


PS: If the part that is most confusing to you is the fact that some notifications link to records that cannot be viewed, you could try to customize messages and add a company_id field to filter the Inbox based on the current user company. This means the user has multiple Inboxes, and might require some core changes in the messaging system.

** Changed in: openobject-addons
   Importance: Medium => Undecided

** Changed in: openobject-addons
       Status: New => Invalid

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1210263

Title:
  Permissions users multicompany

Status in OpenERP Addons (modules):
  Invalid

Bug description:
  1) Steps to reproduce the issue you have observed

  You can create 2 sister companies (companyA, companyB), and 2 users
  (user1 and user2),

  The user1 have the companyA, and user2 have companyA and companyB.

  The user1 add as follower in a purchase_order to user2, and when the
  user2 have at present the companyA can view the purchase, but if the
  user2 change you company to companyB, this already can't view the
  purchase, by permissions.

  Can find a demonstrative video here::
  http://www.youtube.com/watch?v=Obf7Ca_4vOU

  
  2) The result you expected:

  As the user2 is multicompany, i find that with the two company he can
  view the documents

  3)  I use Ubuntu 12.4

  OpenERP -.-
  Server revno: ---- 5045
  addons revno: ---- 9335
  web addons revno: ---- 4005

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1210263/+subscriptions


References