Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
3313 Ansichten

HELLO

I use odoo 8 In tree view,I want annotations invisible to another employee.

Such employees can only see their own annotations, and managers can see all the annotation


1.name is annotation

<field name="name"/>


2.managers can see all the annotation,so I set managers to base.group_no_one

<field name="name groups="base.group_no_one"/>


But I don't know how to employees can only see their own annotations?


Thank you so much.

Avatar
Verwerfen
Autor Beste Antwort

HELLO I tested but faild.


I Write down the detailed steps

1.install Leave Management module

https://www.odoo.com/apps/8.0/hr_holidays/

2.change rule (Record Rule option in settings--> Technical --> Security --> record Rule)

it can lent everyone to see Leave information

Employee Holidays

[('employee_id.user_id','=',user.id)] to [(1,'=',1)]

Employee Holidays Create, Write, Unlink

[('employee_id.user_id','=',user.id)], ('state', 'in', ['draft', 'confirm', 'cancel'])] to[(1,'=',1)], ('state', 'in', ['draft', 'confirm', 'cancel'])]


I will lent employees can only see their own Description, and managers can see all Description.

3. I set managers to base.group_no_one and change form view and tree view

<field name="name"/> to <field name="name" groups="base.group_no_one"/>

I set mail.followers: read and write others entries of base.group_no_one 

[('user_id', '=', user.id)]

but faild.



So Is there any way?

Avatar
Verwerfen
Beste Antwort

Hi ,

 For that you need to write record rule for that group 

Ex: To view their own  annotations you need to write like this

[('user_id', '=', user.id)]

Record Rule option in settings--> Technical --> Security --> record Rule

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
4
Feb. 24
11506
0
Sept. 25
1427
1
Juni 23
1979
1
Okt. 22
13894
0
Okt. 22
2543