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.

76 lines
3.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_users_search" model="ir.ui.view">
  5. <field name="inherit_id" ref="base.view_users_search"/>
  6. <field name="name">res.users.search</field>
  7. <field name="model">res.users</field>
  8. <field name="arch" type="xml">
  9. <xpath expr="//search[@string='Users']" position="inside">
  10. <filter string="Active" context="{'group_by': 'active'}"/>
  11. </xpath>
  12. </field>
  13. </record>
  14. <record id="view_users_tree" model="ir.ui.view">
  15. <field name="inherit_id" ref="base.view_users_tree"/>
  16. <field name="name">res.users.tree</field>
  17. <field name="model">res.users</field>
  18. <field name="sequence">20</field>
  19. <field name="arch" type="xml">
  20. <field name="login" position="after">
  21. <field name="active" widget="boolean_switch"
  22. options="{'quick_edit': True, 'extra': {'onText': 'Yes', 'offText': 'No'}}"
  23. context="{'test': 'test value'}"/>
  24. </field>
  25. </field>
  26. </record>
  27. <record id="view_users_form" model="ir.ui.view">
  28. <field name="inherit_id" ref="base.view_users_form"/>
  29. <field name="name">res.users.form</field>
  30. <field name="model">res.users</field>
  31. <field name="arch" type="xml">
  32. <field name="active" position="replace">
  33. <field name="active" widget="boolean_switch" readonly="0"
  34. options="{'quick_edit': True, 'extra': {'onText': 'Yes', 'offText': 'No'}}"
  35. context="{'test': 'test value'}"/>
  36. </field>
  37. </field>
  38. </record>
  39. <record id="view_users_tree_editable" model="ir.ui.view">
  40. <field name="name">res.users.tree</field>
  41. <field name="model">res.users</field>
  42. <field name="arch" type="xml">
  43. <tree string="Users" editable="top">
  44. <field name="name"/>
  45. <field name="login"/>
  46. <field name="lang"/>
  47. <field name="active" widget="boolean_switch"
  48. options="{'quick_edit': True, 'extra': {'onText': 'Yes', 'offText': 'No'}}"
  49. context="{'test': 'test value'}" />
  50. </tree>
  51. </field>
  52. </record>
  53. <record id="action_res_users_tree_editable" model="ir.actions.act_window">
  54. <field name="name">Tree Editable Users</field>
  55. <field name="type">ir.actions.act_window</field>
  56. <field name="res_model">res.users</field>
  57. <field name="view_type">form</field>
  58. <field name="view_id" ref="view_users_tree_editable"/>
  59. <field name="search_view_id" ref="base.view_users_search"/>
  60. </record>
  61. <record id="action_res_users_tree_view_editable" model="ir.actions.act_window.view">
  62. <field eval="10" name="sequence"/>
  63. <field name="view_mode">tree</field>
  64. <field name="view_id" ref="view_users_tree_editable"/>
  65. <field name="act_window_id" ref="action_res_users_tree_editable"/>
  66. </record>
  67. <menuitem action="action_res_users_tree_editable"
  68. id="menu_action_res_users_tree_editable"
  69. parent="base.menu_users"/>
  70. </data>
  71. </openerp>