diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 17:14:58 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 17:14:58 +0700 |
| commit | 1ca3b3df3421961caec3b747a364071c80f5c7da (patch) | |
| tree | 6778a1f0f3f9b4c6e26d6d87ccde16e24da6c9d6 /om_hr_payroll/security | |
| parent | b57188be371d36d96caac4b8d65a40745c0e972c (diff) | |
initial commit
Diffstat (limited to 'om_hr_payroll/security')
| -rw-r--r-- | om_hr_payroll/security/hr_payroll_security.xml | 45 | ||||
| -rw-r--r-- | om_hr_payroll/security/ir.model.access.csv | 16 |
2 files changed, 61 insertions, 0 deletions
diff --git a/om_hr_payroll/security/hr_payroll_security.xml b/om_hr_payroll/security/hr_payroll_security.xml new file mode 100644 index 0000000..10826db --- /dev/null +++ b/om_hr_payroll/security/hr_payroll_security.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + + <record model="ir.module.category" id="base.module_category_payroll_localization"> + <field name="name">Payroll</field> + <field name="visible" eval="0" /> + </record> + + <record id="group_hr_payroll_user" model="res.groups"> + <field name="name">Officer</field> + <field name="category_id" ref="base.module_category_payroll_localization"/> + <field name="implied_ids" + eval="[(4, ref('hr.group_hr_user')), (4, ref('hr_contract.group_hr_contract_manager'))]"/> + </record> + + <record id="group_hr_payroll_manager" model="res.groups"> + <field name="name">Manager</field> + <field name="category_id" ref="base.module_category_payroll_localization"/> + <field name="implied_ids" eval="[(4, ref('om_hr_payroll.group_hr_payroll_user'))]"/> + <field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/> + </record> + + <record id="base.default_user" model="res.users"> + <field name="groups_id" eval="[(4,ref('om_hr_payroll.group_hr_payroll_manager'))]"/> + </record> + + <record id="hr_payroll_rule_officer" model="ir.rule"> + <field name="name">Officer and subordinates Payslip</field> + <field name="model_id" ref="model_hr_payslip"/> + <field name="domain_force">['|','|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id', + '=', False), ('employee_id.department_id.manager_id.user_id', '=', user.id)] + </field> + <field name="groups" eval="[(4, ref('om_hr_payroll.group_hr_payroll_user'))]"/> + </record> + + <record id="hr_payslip_rule_manager" model="ir.rule"> + <field name="name">All Payslip</field> + <field name="model_id" ref="model_hr_payslip"/> + <field name="domain_force">[(1,'=',1)]</field> + <field name="groups" eval="[(4, ref('om_hr_payroll.group_hr_payroll_manager'))]"/> + </record> + + </data> +</odoo> diff --git a/om_hr_payroll/security/ir.model.access.csv b/om_hr_payroll/security/ir.model.access.csv new file mode 100644 index 0000000..f665c3f --- /dev/null +++ b/om_hr_payroll/security/ir.model.access.csv @@ -0,0 +1,16 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_hr_payroll_structure,hr.payroll.structure,model_hr_payroll_structure,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_payroll_structure_hr_user,hr.payroll.structure.hr.user,model_hr_payroll_structure,hr.group_hr_user,1,0,0,0 +access_hr_contribution_register,hr.contribution.register,model_hr_contribution_register,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_salary_rule_category,hr.salary.rule.category,model_hr_salary_rule_category,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_payslip,hr.payslip,model_hr_payslip,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_payslip_line,hr.payslip.line,model_hr_payslip_line,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_payslip_input_user,hr.payslip.input.user,model_hr_payslip_input,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_payslip_worked_days_officer,hr.payslip.worked_days.officer,model_hr_payslip_worked_days,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_payslip_run,hr.payslip.run,model_hr_payslip_run,om_hr_payroll.group_hr_payroll_manager,1,1,1,1 +access_hr_rule_input_officer,hr.rule.input.office,model_hr_rule_input,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_salary_rule_user,hr.salary.rule.user,model_hr_salary_rule,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_contract_advantage_template,hr.contract.advantage.template.user,model_hr_contract_advantage_template,om_hr_payroll.group_hr_payroll_user,1,1,1,1 +access_hr_contract_advantage_template_hr_user,hr.contract.advantage.template.hr.user,model_hr_contract_advantage_template,hr.group_hr_user,1,0,0,0 +access_hr_payslip_employees_hr_user,hr.payslip.employees.hr.user,model_hr_payslip_employees,hr.group_hr_user,1,1,1,1 +access_payslip_lines_contribution_register_hr_user,payslip.lines.contribution.register.hr.user,model_payslip_lines_contribution_register,hr.group_hr_user,1,1,1,1 |
