コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2267 ビュー

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 ?


アバター
破棄
関連投稿 返信 ビュー 活動
0
4月 24
1815
4
11月 23
5845
0
10月 23
1655
0
12月 22
2532
2
12月 23
19207