test_mail_security.xml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo noupdate="1">
  3. <record id="mail_test_multi_company_rule" model="ir.rule">
  4. <field name="name">Mail Test Multi Company</field>
  5. <field name="model_id" ref="test_mail.model_mail_test_multi_company"/>
  6. <field eval="True" name="global"/>
  7. <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
  8. </record>
  9. <record id="mail_test_multi_company_read_rule" model="ir.rule">
  10. <field name="name">MC Readonly Rule</field>
  11. <field name="model_id" ref="test_mail.model_mail_test_multi_company_read"/>
  12. <field name="perm_read" eval="False"/>
  13. <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
  14. <field name="global" eval="True"/>
  15. </record>
  16. <record id="mail_test_multi_company_with_activity_rule" model="ir.rule">
  17. <field name="name">Mail Test Multi Company With Activity</field>
  18. <field name="model_id" ref="test_mail.model_mail_test_multi_company_with_activity"/>
  19. <field eval="True" name="global"/>
  20. <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
  21. </record>
  22. <!-- TICKET-LIKE -->
  23. <record id="mail_test_ticket_rule_portal" model="ir.rule">
  24. <field name="name">Portal Mail Test Ticket</field>
  25. <field name="model_id" ref="test_mail.model_mail_test_ticket"/>
  26. <field name="domain_force">[('message_partner_ids', 'in', [user.partner_id.id])]</field>
  27. <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
  28. </record>
  29. <!-- MULTI COMPANY TICKET LIKE -->
  30. <record id="mail_test_ticket_mc_rule" model="ir.rule">
  31. <field name="name">Mail Test Ticket Multi Company</field>
  32. <field name="model_id" ref="test_mail.model_mail_test_ticket_mc"/>
  33. <field name="global" eval="True"/>
  34. <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
  35. </record>
  36. <record id="mail_test_ticket_mc_rule_portal" model="ir.rule">
  37. <field name="name">Portal Mail Test Ticket Multi Company</field>
  38. <field name="model_id" ref="test_mail.model_mail_test_ticket_mc"/>
  39. <field name="domain_force">[('message_partner_ids', 'in', [user.partner_id.id])]</field>
  40. <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
  41. </record>
  42. <!-- PROJECT-LIKE -->
  43. <record id="mail_test_container_rule_portal" model="ir.rule">
  44. <field name="name">Portal Mail Test Container</field>
  45. <field name="model_id" ref="test_mail.model_mail_test_container"/>
  46. <field name="domain_force">[('message_partner_ids', 'in', [user.partner_id.id])]</field>
  47. <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
  48. </record>
  49. <!-- MULTI COMPANY PROJECT LIKE -->
  50. <record id="mail_test_container_mc_rule" model="ir.rule">
  51. <field name="name">Mail Test Container Multi Company</field>
  52. <field name="model_id" ref="test_mail.model_mail_test_container_mc"/>
  53. <field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'in', company_ids)]</field>
  54. <field name="global" eval="True"/>
  55. </record>
  56. <record id="mail_test_container_mc_rule_portal" model="ir.rule">
  57. <field name="name">Portal Mail Test Container Multi Company</field>
  58. <field name="model_id" ref="test_mail.model_mail_test_container_mc"/>
  59. <field name="domain_force">[('message_partner_ids', 'in', [user.partner_id.id])]</field>
  60. <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
  61. </record>
  62. </odoo>