You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
2.8 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="group_assigned_points_of_sale_user" model="res.groups">
  4. <field name="name">User: Assigned POS Only</field>
  5. <field name="category_id" ref="base.module_category_point_of_sale"/>
  6. <field name="comment">The user will have access to her assigned points of sale.</field>
  7. </record>
  8. <record id="point_of_sale.group_pos_user" model="res.groups">
  9. <field name="implied_ids" eval="[(4, ref('group_assigned_points_of_sale_user'))]"/>
  10. </record>
  11. <data noupdate="1">
  12. <record id="pos_config_assigned_users" model="ir.rule">
  13. <field name="name">Assigned points of sale</field>
  14. <field ref="point_of_sale.model_pos_config" name="model_id"/>
  15. <field name="domain_force">['|',('assigned_user_ids','in',user.id),('assigned_user_ids','=',False)]</field>
  16. <field name="groups" eval="[(4, ref('group_assigned_points_of_sale_user'))]"/>
  17. </record>
  18. <record id="pos_session_assigned_users" model="ir.rule">
  19. <field name="name">Assigned POS sessions</field>
  20. <field ref="point_of_sale.model_pos_session" name="model_id"/>
  21. <field name="domain_force">['|',('config_id.assigned_user_ids','in',user.id),('config_id.assigned_user_ids','=',False)]</field>
  22. <field name="groups" eval="[(4, ref('group_assigned_points_of_sale_user'))]"/>
  23. </record>
  24. <record id="pos_order_assigned_users" model="ir.rule">
  25. <field name="name">Assigned POS orders</field>
  26. <field ref="point_of_sale.model_pos_order" name="model_id"/>
  27. <field name="domain_force">['|',('session_id.config_id.assigned_user_ids','in',user.id),('session_id.config_id.assigned_user_ids','=',False)]</field>
  28. <field name="groups" eval="[(4, ref('group_assigned_points_of_sale_user'))]"/>
  29. </record>
  30. <record id="pos_config_see_all" model="ir.rule">
  31. <field name="name">All points of sale</field>
  32. <field ref="point_of_sale.model_pos_config" name="model_id"/>
  33. <field name="domain_force">[(1,'=',1)]</field>
  34. <field name="groups" eval="[(4, ref('point_of_sale.group_pos_user'))]"/>
  35. </record>
  36. <record id="pos_session_see_all" model="ir.rule">
  37. <field name="name">All POS sessions</field>
  38. <field ref="point_of_sale.model_pos_session" name="model_id"/>
  39. <field name="domain_force">[(1,'=',1)]</field>
  40. <field name="groups" eval="[(4, ref('point_of_sale.group_pos_user'))]"/>
  41. </record>
  42. <record id="pos_order_see_all" model="ir.rule">
  43. <field name="name">All POS orders</field>
  44. <field ref="point_of_sale.model_pos_order" name="model_id"/>
  45. <field name="domain_force">[(1,'=',1)]</field>
  46. <field name="groups" eval="[(4, ref('point_of_sale.group_pos_user'))]"/>
  47. </record>
  48. </data>
  49. </odoo>