Odoo Help


Readonly Field By Groups [Closed]

on 6/7/16, 11:57 PM 758 views

The Question has been closed for reason: duplicate question

on 06/07/2016 23:59:52

Hi All,

i want make field 'job_id' in object hr.employee readonly if the employee base on group 'base.group_hr_user' and not readonly for other.

i have use this code in xml

<record id="mtc_employee_form5_view" model="ir.ui.view">

<field name="name">hr.employee.form.officer</field>

<field name="model">hr.employee</field>

<field name="inherit_id" ref="hr.view_employee_form" />

<field name="groups_id" eval="[(6, 0, [ref('base.group_hr_user') ])]" />

<field name="arch" type="xml">

<field name="job_id" position="attributes">

<attribute name="readonly">1</attribute>




but the result, field job_id readonly for all groups. i just want field job_id readonly for groups='base.group_hr_user'.

Hope anyone can help me. Thanks

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.


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

1 follower(s)


Asked: 6/7/16, 11:57 PM
Seen: 758 times
Last updated: 6/7/16, 11:59 PM