Hi to All,
I have to create an access rule in which I have to compare the company_id with Allowed Companies(many2many field company_ids in users screen).
Thanks in Advance
In OpenERP, for major of the existing models the record rule exists where there is a field company_id or user_id.
If you model is custom, you should consider the following record rule.
=> Means the user will see the records of your model where he is the user of the main company or its children companies.
Or, foryour own record, its company_ids field for 'Allowed companies'. So [('company_id','in',user.company_ids)]
Hope this helps.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 6/19/14, 11:38 AM|
|Seen: 1329 times|
|Last updated: 5/21/16, 9:52 AM|