From 142261ad5ea03369bd3a1f61c3648b167f9da3d3 Mon Sep 17 00:00:00 2001 From: Saurang Suthar Date: Mon, 3 Sep 2012 12:46:13 +0530 Subject: [PATCH] [IMP]removed access denied error at the time of clicking on Timesheets and Payslips button in employee form by HR/Employee and created new access rules for HR/Employee bzr revid: ssu@tinyerp.com-20120903071613-731x8686z2euy0sk --- addons/hr/security/ir.model.access.csv | 1 + addons/hr_payroll/security/hr_security.xml | 7 +++++++ addons/hr_payroll/security/ir.model.access.csv | 6 +++++- .../security/hr_timesheet_sheet_security.xml | 7 +++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/addons/hr/security/ir.model.access.csv b/addons/hr/security/ir.model.access.csv index 121e0f23f25..07593028028 100644 --- a/addons/hr/security/ir.model.access.csv +++ b/addons/hr/security/ir.model.access.csv @@ -7,4 +7,5 @@ access_hr_employee_resource_user,resource.resource.user,resource.model_resource_ access_hr_department_user,hr.department.user,model_hr_department,base.group_hr_user,1,1,1,1 access_hr_department_employee,hr.department.employee,model_hr_department,base.group_user,1,0,0,0 access_hr_job_user,hr.job user,model_hr_job,base.group_hr_user,1,1,1,1 +access_hr_employee_user,hr.employee user,model_hr_employee,base.group_user,1,1,1,1 access_ir_property_hr_user,ir_property hr_user,base.model_ir_property,base.group_hr_user,1,1,1,0 diff --git a/addons/hr_payroll/security/hr_security.xml b/addons/hr_payroll/security/hr_security.xml index d55f1c81cce..c97c0b5a5eb 100644 --- a/addons/hr_payroll/security/hr_security.xml +++ b/addons/hr_payroll/security/hr_security.xml @@ -13,5 +13,12 @@ + + Employee Payslip Rule + + ['|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id.manager_id.user_id', '=', user.id)] + + + \ No newline at end of file diff --git a/addons/hr_payroll/security/ir.model.access.csv b/addons/hr_payroll/security/ir.model.access.csv index 24ca631c4d8..58d5835fb6b 100644 --- a/addons/hr_payroll/security/ir.model.access.csv +++ b/addons/hr_payroll/security/ir.model.access.csv @@ -4,8 +4,12 @@ access_hr_contribution_register,hr.contribution.register,model_hr_contribution_r access_hr_salary_rule_category,hr.salary.rule.category,model_hr_salary_rule_category,base.group_hr_user,1,1,1,1 access_hr_payslip,hr.payslip,model_hr_payslip,base.group_hr_user,1,1,1,1 access_hr_payslip_line,hr.payslip.line,model_hr_payslip_line,base.group_hr_user,1,1,1,1 +access_hr_payslip,hr.payslip,model_hr_payslip,base.group_user,1,0,0,0 +access_hr_payslip_line,hr.payslip.line,model_hr_payslip_line,base.group_user,1,0,0,0 access_hr_payslip_input_user,hr.payslip.input.user,model_hr_payslip_input,base.group_hr_user,1,1,1,1 access_hr_payslip_worked_days ,hr.payslip.worked_days,model_hr_payslip_worked_days,base.group_hr_manager,1,1,1,1 +access_hr_payslip_input_user,hr.payslip.input.user,model_hr_payslip_input,base.group_user,1,0,0,0 +access_hr_payslip_worked_days ,hr.payslip.worked_days,model_hr_payslip_worked_days,base.group_user,1,0,0,0 access_hr_payslip_run,hr.payslip.run,model_hr_payslip_run,base.group_hr_manager,1,1,1,1 access_hr_rule_input,hr.rule.input,model_hr_rule_input,base.group_hr_manager,1,1,1,1 -access_hr_salary_rule_user,hr.salary.rule.user,model_hr_salary_rule,base.group_hr_user,1,1,1,1 +access_hr_salary_rule_user,hr.salary.rule.user,model_hr_salary_rule,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/addons/hr_timesheet_sheet/security/hr_timesheet_sheet_security.xml b/addons/hr_timesheet_sheet/security/hr_timesheet_sheet_security.xml index ff387a898ca..8755e319ae9 100644 --- a/addons/hr_timesheet_sheet/security/hr_timesheet_sheet_security.xml +++ b/addons/hr_timesheet_sheet/security/hr_timesheet_sheet_security.xml @@ -9,5 +9,12 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + Employee Timesheet Rule + + ['|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id.manager_id.user_id', '=', user.id)] + + +