Skip to content

Commit

Permalink
[I18N] hr_attendance_reason: Allow the creation, editing and deletion…
Browse files Browse the repository at this point in the history
… of reasons for managers only
  • Loading branch information
TomTietze committed Dec 5, 2024
1 parent eebce62 commit 5b223cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions hr_attendance_reason/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_hr_attendance_reason_user,hr.attendance.reason.user,model_hr_attendance_reason,hr.group_hr_user,1,1,1,1
access_hr_attendance_reason_employee,hr.attendance.reason.employee,model_hr_attendance_reason,base.group_user,1,1,1,1
access_hr_attendance_reason_user,hr.attendance.reason.user,model_hr_attendance_reason,hr.group_hr_user,1,0,0,0
access_hr_attendance_reason_employee,hr.attendance.reason.employee,model_hr_attendance_reason,base.group_user,1,0,0,0
access_hr_attendance_reason_manager,hr.attendance.reason.manager,model_hr_attendance_reason,hr_attendance.group_hr_attendance_manager,1,1,1,1
12 changes: 10 additions & 2 deletions hr_attendance_reason/views/hr_attendance_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
<sheet position="inside">
<group name="reason">
<group>
<field name="attendance_reason_ids" widget="many2many_tags" />
<field
name="attendance_reason_ids"
widget="many2many_tags"
options="{'no_create': True}"
/>
</group>
</group>
</sheet>
Expand All @@ -22,7 +26,11 @@
<field name="priority">500</field>
<field name="arch" type="xml">
<field name="worked_hours" position="after">
<field name="attendance_reason_ids" widget="many2many_tags" />
<field
name="attendance_reason_ids"
widget="many2many_tags"
options="{'no_create': True}"
/>
</field>
</field>
</record>
Expand Down

0 comments on commit 5b223cf

Please sign in to comment.