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.

0

Allow users in a group to edit their own user data.

By
Ratmil Torres
on 5/6/16, 1:12 PM 283 views

I have a model that inherits from res.users. And I added a field to that model, extending the users model.

Now, I want users in a specific group to be able to edit that field, but only their own user record.

<record model="ir.rule" id="fs_res_user_own_write">

<field name="name">fs_res_user_own_write</field>

<field name="model_id" ref="model_res_users"/>

<field name="domain_force">[('id', '=', user.id)]</field>

<field name="perm_read" eval="True"/>

<field name="perm_write" eval="True"/>

<field name="perm_create" eval="True"/>

<field name="group_id" ref="my_user_group"/>

<field name="perm_unlink" eval="False"/>

</record>


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: 5/6/16, 1:12 PM
Seen: 283 times
Last updated: 5/6/16, 2:15 PM