openERP restrict users

418 Views Asked by At

I'm facing a complex problem, at least for me.

I have a form called "Task", which contains all the normal info, and I would like to add users to that Task.

  1. If I want to add multiple users to that task, I should use the widget one2many, am I right? If so, is it possible to display a dropdown or something and add the users already registered? Because, with the default one2many, I have to register the users (like a Form) and then I can add them..but if they are already in the table, it should appear me a dropdown menu or something..
  2. After the task is created, the users should only see the task with their name, only administrator can view it all. I think that to achieve this I need to create rules, right? If so, do I need to create them by code or could I use the openERP rule menu? And this will be enough: ('user_id', '=', user.id)]? The first column "user_id" is created on "Task" table?
  3. I do not need to have a auxiliary table that would contain something like: id, task_id, id_user..and by this I could get which tasks belongs to whichs users??

Thanks guys

1

There are 1 best solutions below

0
On

For your cases:

  1. You can try using Many2Many relation so as to choose the record of users.

  2. Use Groups to obtain your desired result.

For example: <field name="user_id" groups="your_group" />

By doing this you can provide what fields to be visible to which user based on access rights provided in your GROUPS.