콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
5835 화면

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'] )

아바타
취소
관련 게시물 답글 화면 활동
2
5월 24
2520
3
4월 23
11988
1
4월 23
15028
9
12월 23
24301
1
5월 20
6712