summaryrefslogtreecommitdiff
path: root/addons/hr_work_entry/security
diff options
context:
space:
mode:
authorlbs-odoo <lbs@odoo.com>2019-06-17 11:14:38 +0000
committerYannick Tivisse <yti@odoo.com>2019-07-05 07:40:06 +0000
commit981907fd43a0c589a0dcd9653b0eb06faa1f62c2 (patch)
treedab0839363ad8b275274264d41b38ab6df38df47 /addons/hr_work_entry/security
parent3fc2a27808ca4e4ce74884580543e70537d5ce3b (diff)
[ADD] hr_work_entry: Move work entries mechanism into its own module
Purpose ======= We would like to re-use the work entries in the attendance module. As hr_attendance is not dependant on hr_payroll, we move the whole mechanism into its own module. This could be reused too into others modules, like forecasting or whatever. TaskID: 1904850 closes odoo/odoo#34434 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/hr_work_entry/security')
-rw-r--r--addons/hr_work_entry/security/hr_work_entry_security.xml17
-rw-r--r--addons/hr_work_entry/security/ir.model.access.csv5
2 files changed, 22 insertions, 0 deletions
diff --git a/addons/hr_work_entry/security/hr_work_entry_security.xml b/addons/hr_work_entry/security/hr_work_entry_security.xml
new file mode 100644
index 00000000000..357f37fd2ff
--- /dev/null
+++ b/addons/hr_work_entry/security/hr_work_entry_security.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data noupdate="1">
+
+ <record id="hr_user_work_entry_employee" model="ir.rule">
+ <field name="name">Work entries/Employee calendar filter: only self</field>
+ <field name="model_id" ref="model_hr_user_work_entry_employee"/>
+ <field name="domain_force">[('user_id', '=', user.id)]</field>
+ <field name="groups" eval="[(4, ref('base.group_user'))]"/>
+ <field name="perm_create" eval="1"/>
+ <field name="perm_write" eval="1"/>
+ <field name="perm_unlink" eval="1"/>
+ <field name="perm_read" eval="0"/>
+ </record>
+
+ </data>
+</odoo>
diff --git a/addons/hr_work_entry/security/ir.model.access.csv b/addons/hr_work_entry/security/ir.model.access.csv
new file mode 100644
index 00000000000..7350f08cb78
--- /dev/null
+++ b/addons/hr_work_entry/security/ir.model.access.csv
@@ -0,0 +1,5 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_hr_work_entry_officer,access_hr_work_entry_officer,model_hr_work_entry,hr.group_hr_user,1,1,1,1
+access_hr_work_entry_type_officer,access_hr_work_entry_type_officer,model_hr_work_entry_type,hr.group_hr_user,1,0,0,0
+access_hr_work_entry_type_manager,access_hr_work_entry_type_manager,model_hr_work_entry_type,hr.group_hr_manager,1,1,1,1
+access_hr_work_entry_employee,access_hr_work_entry_employee,model_hr_user_work_entry_employee,hr.group_hr_user,1,1,1,1 \ No newline at end of file