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

Hi the scenario is like this .

I have a record and that recoed is editable in all states except approved .

I have three groups.

group_A, group_B, group_C and group A and B can edit it in draft and new states . and group C can edit it once the record is in approved state.

'timesheet_ot_ids' : fields.one2many('timesheet.ot.line', 'sheet_otid',
            'Timesheet OT lines',
            readonly=True, states={
                'draft': [('readonly', False)],
                'new': [('readonly', False)]}
            ),

and i need to make it editable for users from a particular group even though the state is approved .

Appreciate your help .

Thanks.

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

Hi, you can use this in your py file field...

'name': fields.char('Name', size=128, read=['base.group_userA'], write=['base.group_userB'] )

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
พ.ค. 24
2258
3
เม.ย. 23
11745
1
เม.ย. 23
14733
how to assign menu to groups แก้ไขแล้ว
9
ธ.ค. 23
24038
1
พ.ค. 20
6487