Community mailing list archives

community@mail.odoo.com

Avatar

Re: Give access right for some users to see some objects [ Odoo 11 CE ]

by
Hacene MEZIANI
- 29/10/2017 05:22:22
Hi Jake,
Yes, Security controle in odoo is per groups, but those groups allow to access to an object (model for exemple) but they doesn't make filter by data (instances).
I have spent many time to find a solution, I don't know why documentation in Odoo is very poor, and we don't see examples as we see in other languages as PHP .
Please tell me if theris another better way than I did:
I have many cash journals (Journal 1, journal 2,journal 3..) and I want that user 1 ca see only journal 1 and user 2 see only journal 2 and user 3 see all of them in accounting dashbord.
So I added a page in Journal form and I called it user_ids which is a many2many field to res.user, and in this page i add a specific users regarding to my needs.
and in the group , i created a rule for the model 'journal' and I put in the domain filter this entry: [('user_ids', '=', user.id)] and everything works fine.

Please tell me if there is another best way to do that
Thank you

2017-10-28 6:20 GMT+01:00 Jake Shelter <shelterjake7@gmail.com>:
Hacene,

Those action-wise, you can create group access.

Security control in odoo is per group.

On Thu, Oct 19, 2017 at 1:45 AM, Hacene MEZIANI <hacene.meziani@gmail.com> wrote:
Thank you Victor Jimenez but it's not enaugh. I want to apply rules for the instances of objects, not to the models or files..I mean to the data
I didn't find this

2017-10-18 16:20 GMT+01:00 Victor Jimenez <v1ktop@hotmail.com>:

You need to activate the developer mode in Settings .


http://www.odoo.com/documentation/10.0/reference/security.html




Aside from manually managing access using custom code, Odoo provides two main data-driven mechanisms to manage or restrict access to data. Both mechanisms are linked ...



???Victor Jimenez ??????
??
??

De: Hacene MEZIANI <hacene.meziani@gmail.com>
Enviado: miércoles, 18 de octubre de 2017 07:10:22 a. m.
Para: Community
Asunto: Fwd: Give access right for some users to see some objects [ Odoo 11 CE ]
 
Dear Communauty Members,
I hope you are fine.
I'd like to know how to configure access right for some users to see or to manipulate only some objects.
Exemple: in accounting dashbord (see attached file), I want that some users, for Example "Mohamed", to see only the Cash journal, but not the others.

- How I do it technicaly ?
- How I allow for my customer to do it him self easaly ?

Thank you et have a wonderful day !

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
BR,
Jake Shelter,
Developer

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--

Reference