diff --git a/portal_holidays/__manifest__.py b/portal_holidays/__manifest__.py index 86d047f9..430320e7 100644 --- a/portal_holidays/__manifest__.py +++ b/portal_holidays/__manifest__.py @@ -34,8 +34,14 @@ ], 'data': [ 'security/res_groups.xml', + 'security/ir_rule.xml', 'security/ir.model.access.csv', 'views/base_menus.xml', + 'views/hr_employee_views.xml', + ], + 'demo': [ + 'demo/hr_demo.xml', + 'demo/res_users_demo.xml', ], 'installable': True, 'auto_install': False, diff --git a/portal_holidays/demo/hr_demo.xml b/portal_holidays/demo/hr_demo.xml new file mode 100644 index 00000000..b53ffb74 --- /dev/null +++ b/portal_holidays/demo/hr_demo.xml @@ -0,0 +1,71 @@ + + + + + John Portal Advanced + + + + + Junior Developer + + + + 2022-01-01 00:00:00 + + + + + Paid Time Off for John Portal Advanced + + 10 + + + confirm + + + + + + + + + Time Management Training + + 7 + + + confirm + + + + + + + + + + + Trip with Family + + + + + + + + + + + Sick day + + + + + + + + confirm + + + diff --git a/portal_holidays/demo/res_users_demo.xml b/portal_holidays/demo/res_users_demo.xml index 631fd827..4f4bc96b 100644 --- a/portal_holidays/demo/res_users_demo.xml +++ b/portal_holidays/demo/res_users_demo.xml @@ -1,8 +1,6 @@ - - - + + - diff --git a/portal_holidays/security/ir.model.access.csv b/portal_holidays/security/ir.model.access.csv new file mode 100644 index 00000000..02f05b00 --- /dev/null +++ b/portal_holidays/security/ir.model.access.csv @@ -0,0 +1,12 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +portal_holiday_user_allocation,portal-holiday-model_hr_leave_allocation,hr_holidays.model_hr_leave_allocation,group_portal_backend_holiday,1,1,1,0 +portal_holiday_user_holidays,portal-holiday-model_hr_leave,hr_holidays.model_hr_leave,group_portal_backend_holiday,1,1,1,0 +portal_holiday_calendar_attendee,portal-holiday-model_calendar_attendee,calendar.model_calendar_attendee,group_portal_backend_holiday,1,0,0,0 +portal_holiday_calendar_event,portal-holiday-model_calendar_event,calendar.model_calendar_event,group_portal_backend_holiday,1,0,0,0 +portal_holiday_hr_employee_public,portal-holiday-model_hr_employee_public,hr.model_hr_employee_public,group_portal_backend_holiday,1,0,0,0 +portal_holiday_hr_leave_type,portal-holiday-model_hr_leave_type,hr_holidays.model_hr_leave_type,group_portal_backend_holiday,1,0,0,0 +portal_holiday_hr_leave_stress_day,portal-holiday-model_hr_leave_stress_day,hr_holidays.model_hr_leave_stress_day,group_portal_backend_holiday,1,0,0,0 +portal_holiday_resource_calendar,portal-holiday-model_resource_calendar,resource.model_resource_calendar,group_portal_backend_holiday,1,0,0,0 +portal_holiday_resource_calendar_attendance,portal-holiday-model_resource_calendar_attendance,resource.model_resource_calendar_attendance,group_portal_backend_holiday,1,0,0,0 +portal_holiday_resource_calendar_leaves,portal-holiday-model_resource_calendar_leaves,resource.model_resource_calendar_leaves,group_portal_backend_holiday,1,0,0,0 +portal_holiday_resource_resource,portal-holiday-model_resource_resource,resource.model_resource_resource,group_portal_backend_holiday,1,0,0,0 diff --git a/portal_holidays/security/ir_rule.xml b/portal_holidays/security/ir_rule.xml new file mode 100644 index 00000000..ac0c60a2 --- /dev/null +++ b/portal_holidays/security/ir_rule.xml @@ -0,0 +1,14 @@ + + + + + res_partner: portal holiday: read access on manager partner + + [('id', 'child_of', user.employee_parent_id.related_contact_ids.ids)] + + + + + + + diff --git a/portal_holidays/security/res_groups.xml b/portal_holidays/security/res_groups.xml index 0bc21081..38494db6 100644 --- a/portal_holidays/security/res_groups.xml +++ b/portal_holidays/security/res_groups.xml @@ -9,5 +9,4 @@ Portal Holiday - diff --git a/portal_holidays/views/hr_employee_views.xml b/portal_holidays/views/hr_employee_views.xml new file mode 100644 index 00000000..e92e5b78 --- /dev/null +++ b/portal_holidays/views/hr_employee_views.xml @@ -0,0 +1,16 @@ + + + + + + view.employee.form + hr.employee + + + + [] + + + + +