コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
5613 ビュー

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
2180
3
4月 23
11648
1
4月 23
14664
9
12月 23
23948
1
5月 20
6390