hr_security.xml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="base.module_category_human_resources_employees" model="ir.module.category">
  4. <field name="sequence">9</field>
  5. </record>
  6. <record id="group_hr_user" model="res.groups">
  7. <field name="name">Officer : Manage all employees</field>
  8. <field name="category_id" ref="base.module_category_human_resources_employees"/>
  9. <field name="implied_ids" eval="[(6, 0, [ref('base.group_private_addresses'), ref('base.group_user')])]"/>
  10. <field name="comment">The user will be able to approve document created by employees.</field>
  11. </record>
  12. <record id="group_hr_manager" model="res.groups">
  13. <field name="name">Administrator</field>
  14. <field name="comment">The user will have access to the human resources configuration as well as statistic reports.</field>
  15. <field name="category_id" ref="base.module_category_human_resources_employees"/>
  16. <field name="implied_ids" eval="[(4, ref('group_hr_user'))]"/>
  17. <field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
  18. </record>
  19. <data noupdate="1">
  20. <record id="base.default_user" model="res.users">
  21. <field name="groups_id" eval="[(4,ref('group_hr_manager'))]"/>
  22. </record>
  23. <record id="hr_employee_comp_rule" model="ir.rule">
  24. <field name="name">Employee multi company rule</field>
  25. <field name="model_id" ref="model_hr_employee"/>
  26. <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
  27. </record>
  28. <record id="hr_dept_comp_rule" model="ir.rule">
  29. <field name="name">Department multi company rule</field>
  30. <field name="model_id" ref="model_hr_department"/>
  31. <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
  32. </record>
  33. <record id="hr_employee_public_comp_rule" model="ir.rule">
  34. <field name="name">Employee multi company rule</field>
  35. <field name="model_id" ref="model_hr_employee_public"/>
  36. <field name="domain_force">['|',('company_id', '=',False),('company_id', 'in', company_ids)]</field>
  37. </record>
  38. <record id="hr_job_comp_rule" model="ir.rule">
  39. <field name="name">Job multi company rule</field>
  40. <field name="model_id" ref="model_hr_job"/>
  41. <field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field>
  42. </record>
  43. <record id="hr_plan_company_rule" model="ir.rule">
  44. <field name="name">Plan multi-company rule</field>
  45. <field name="model_id" ref="model_hr_plan"/>
  46. <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
  47. </record>
  48. <record id="hr_plan_activity_type_company_rule" model="ir.rule">
  49. <field name="name">Plan Activity Type multi-company rule</field>
  50. <field name="model_id" ref="model_hr_plan_activity_type"/>
  51. <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
  52. </record>
  53. </data>
  54. </odoo>