Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3334 มุมมอง

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.

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ก.พ. 24
11531
0
ก.ย. 25
1442
1
มิ.ย. 23
2004
1
ต.ค. 22
13942
0
ต.ค. 22
2551