Odoo Help

Welcome!

This community 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.

1

OpenERP 7.0 : Employee fields restriction in edit

By
Manjunath
on 3/12/13, 2:28 AM 1,504 views

When an employee edits his/her information I want to restrict certain fields not to edit by employee (but can be editable by ADMIN).

1
Mario Arias Badila
On 3/13/13, 2:35 AM

Hi,

You could use the "read" and "write" attributes on field definition, like this one:

    _columns = {
        'credit_limit': fields.float(string='Credit Limit',
                                     read=['base.group_sale_salesman'],
                                     write=['base.group_sale_manager']),

This will create a field named credit_limit that will be readable by users belonging to base.group_sale_salesman and writable only by base.group_sale_manager users...

Hi Mario, Thanks for the reply. It helped me a lot.

Manjunath
on 3/14/13, 2:04 AM
0
Turkesh Patel (tpa)
On 3/12/13, 3:56 AM

You can apply group on that field.admin exist to that group not user.

like groups="base.group_no_one"

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/12/13, 2:28 AM
Seen: 1504 times
Last updated: 3/16/15, 8:10 AM