In Attendance section there is 'name' field used to display/edit date. I am having two user groups 'base.group_user' and 'base.group_hr_user'. I want to use inheritance and make this field readonly for 'base.group_user' group and other group 'base.group_hr_user' should work as it is.
Searched over this community and did some changes like that
<record id="odoo_hr_attendance_view_form" model="ir.ui.view">
<field name="name">hr.attendance.form.inherit</field>
<field name="model">hr.attendance</field>
<field name="inherit_id" ref="hr_attendance.view_attendance_form" />
<field name="groups_id" eval="[(6,0, [ref('base.group_user')])]" />
<field name="arch" type="xml">
<field name="name" position="attributes">
<attribute name="attrs">{'readonly':1}</attribute>
</field>
</field>
</record>
But now it's showing readonly for both the groups.
Can anyone please guide me how to achieve my results?
Try this link: https://www.odoo.com/forum/help-1/question/how-to-make-a-field-read-only-based-on-group-security-131725