Odoo Help

1

Making field Editable for one group

By
Ani V
on 5/21/14, 6:47 AM 1,307 views

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.

3

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

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

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 5/21/14, 6:47 AM
Seen: 1307 times
Last updated: 3/16/15, 8:10 AM