Ok, so, I"m working in Odoo 10 and am trying to manage attendances using hr_attendances. I'm trying to hid the create and edit buttons in only the tree view and form view, however the Manual Attendances security group must have create and write permissions so that users can clock in and clock out using the normal means.
Here is what I've tried, but it doesn't seem like the is working.
<record id="timeclock_attendance_tree_manual" model="ir.ui.view">
<field name="name">timeclock.attendance.tree.manual</field>
<field name="model">hr.attendance</field>
<field name="inherit_id" ref="hr_attendance.view_attendance_tree"/>
<field name="groups_id" eval="[(4,ref('hr.group_hr_attendance'))]"/>
<field name="arch" type="xml">
<xpath expr="/tree" position="attributes">
<attribute name="create">false</attribute>
<attribute name="edit">false</attribute>
</xpath>
</field>
</record>
I've tried creating a security group that is separate and not inheriting to the other groups to see if that works. But this actually hides the buttons from everyone including the admin account. Is there anyone out there that can help me set this to only hide the buttons from the specified group?