When an employee edits his/her information I want to restrict certain fields not to edit by employee (but can be editable by ADMIN).
คำถามนี้ถูกตั้งค่าสถานะ
2
ตอบกลับ
7101
มุมมอง
Hi,
You could use the "read" and "write" attributes on field definition, like this one:
_columns = {
'credit_limit': fields.float(string='Credit Limit',
read=['base.group_sale_salesman'],
write=['base.group_sale_manager']),
This will create a field named credit_limit that will be readable by users belonging to base.group_sale_salesman and writable only by base.group_sale_manager users...
Hi Mario, Thanks for the reply. It helped me a lot.
You can apply group on that field.admin exist to that group not user.
like groups="base.group_no_one"
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ| Related Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
|---|---|---|---|---|
|
|
4
ส.ค. 23
|
14518 | ||
|
|
0
พ.ย. 16
|
2514 | ||
|
|
1
มี.ค. 15
|
6516 | ||
|
|
2
มี.ค. 15
|
6621 | ||
|
add a field in employee module
แก้ไขแล้ว
|
|
4
ต.ค. 20
|
9109 |