Ir al contenido
Menú
Se marcó esta pregunta
2254 Vistas

Hello,

I have a model project.product and One2many field in project.project:

products_ids = fields.One2many('project.product', 'project_id', string='Products')

In project.project i also have field 

allowed_managers = fields.Many2many('res.users', string='Allowed managers', groups="project.group_project_manager")

A record rule created for Project / Users group that applies to Create, Write, Delete":

['|', ('project_id.allowed_managers','in',[user.id]), ('project_id','=', False)] 

I need this rule to set Create,Write,Delete project.product for users that are added as managers in the project. The group Project / Users has only Read permission on model project.product.

With this permission i do not see the "Add an item" button in the form view.

If i enable Create permission for Project / Users, the user sees "Add an item" for product_ids of all Project records. 

Is it possible to show "Add an item" button only for users added in allowed_managers and hide the button for all other Project / Users ?


Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
abr 24
1810
4
nov 23
5844
0
oct 23
1648
0
dic 22
2527
2
dic 23
19205