From 3751379f1e9a4c215fb6eb898b4ccc67659b9ace Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 21:51:50 +0700 Subject: initial commit 2 --- .../security/hr_timesheet_security.xml | 67 ++++++++++++++++++++++ addons/hr_timesheet/security/ir.model.access.csv | 7 +++ 2 files changed, 74 insertions(+) create mode 100644 addons/hr_timesheet/security/hr_timesheet_security.xml create mode 100644 addons/hr_timesheet/security/ir.model.access.csv (limited to 'addons/hr_timesheet/security') diff --git a/addons/hr_timesheet/security/hr_timesheet_security.xml b/addons/hr_timesheet/security/hr_timesheet_security.xml new file mode 100644 index 00000000..bbc568f2 --- /dev/null +++ b/addons/hr_timesheet/security/hr_timesheet_security.xml @@ -0,0 +1,67 @@ + + + + + Helps you manage the timesheets. + 13 + + + + See own timesheets + + + + + + + Approver + + + + + + Administrator + + + + + + + + + + + account.analytic.line.timesheet.user + + [ + ('user_id', '=', user.id), + ('project_id', '!=', False), + '|', '|', + ('project_id.privacy_visibility', '!=', 'followers'), + ('project_id.allowed_internal_user_ids', 'in', user.ids), + ('task_id.allowed_user_ids', 'in', user.ids) + ] + + + + + account.analytic.line.timesheet.approver + + [ + ('project_id', '!=', False), + '|', + ('project_id.privacy_visibility', '!=', 'followers'), + ('project_id.allowed_internal_user_ids', 'in', user.ids) + ] + + + + + account.analytic.line.timesheet.manager + + [('project_id', '!=', False)] + + + + + diff --git a/addons/hr_timesheet/security/ir.model.access.csv b/addons/hr_timesheet/security/ir.model.access.csv new file mode 100644 index 00000000..db5329a5 --- /dev/null +++ b/addons/hr_timesheet/security/ir.model.access.csv @@ -0,0 +1,7 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_analytic_line_user,analytic.account.analytic.line.timesheet.user,analytic.model_account_analytic_line,hr_timesheet.group_hr_timesheet_user,1,1,1,1 +access_account_analytic_user,analytic.account.analytic.timesheet.user,analytic.model_account_analytic_account,hr_timesheet.group_hr_timesheet_user,1,1,0,0 +access_uom_uom_hr_timesheet,uom.uom.timesheet.user,uom.model_uom_uom,hr_timesheet.group_hr_timesheet_user,1,0,0,0 +access_project_project,project.project.timesheet.user,model_project_project,hr_timesheet.group_hr_timesheet_user,1,0,0,0 +access_project_task,project.task.timesheet.user,model_project_task,hr_timesheet.group_hr_timesheet_user,1,1,0,0 +access_project_task_create_timesheet,access.project.task.create.timesheet,model_project_task_create_timesheet,hr_timesheet.group_hr_timesheet_user,1,1,1,0 -- cgit v1.2.3