Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
5573 Vizualizări

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.

Imagine profil
Abandonează
Cel mai bun răspuns

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

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mai 24
2121
3
apr. 23
11582
1
apr. 23
14581
9
dec. 23
23872
1
mai 20
6330