This question has been flagged
2 Replies
2890 Views

Hello

   We are working with OpenERP 7.0 on a multi-company environment and we have a problem when a user
   who has access to several companies (C1, C2, C3). at the time of placing an order sales in company 
   C1, in the commercial field (USER_ID) only have access / visibility for users of the company C1.

   We have created users like:

   User1 -> Company Default C1 -> Companies allowed (C1, C2, C3)
   User2 -> Company default C2 -> Companies allowed (C1, C2)
   User3 -> Company default C2 -> Companies allowed (C1, C2)
   User4 -> Company Default C1 -> Companies allowed (C1, C2, C3)

   When, for example, User4 place Order for the company C1, in field user_id only shows the same user    
   and User1. We understand that the system should show the 4 users?


   Thank you very much everyone.

Avatar
Discard
Best Answer

First, I'm not sure what do you mean by Company Default.  The standard res.users in Odoo only have company_id field which is (quoting from the field's help) "The company this user is currently working for".  This is the field that will be changed if the user go into Preferences menu and change the Company.

Second, it is not clear what do you mean by users of Company C1.  If you are referring to the res.users that has company_id field set to Company 1, then the number will change according to which company the users is last logged into.  The best bet, AFAIK, is to search for all users that have access to Company C1 (via company_ids or the Companies allowed for the user) and create a domain for USER_ID field based on that.

Avatar
Discard
Author Best Answer

Hello John

Thanks for your answer.

John how we can create a domain for USER_ID field in sale_oder_view.xml?
Can you give me an example?

thank you very much

Juan

Avatar
Discard