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

Readonly Field By Groups [Closed]

By
Susi
on 6/7/16, 11:57 PM 173 views

The Question has been closed for reason: duplicate question

by
Susi
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>

</field>

</field>

</record>


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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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