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.

73 lines
3.3 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. </field>
  24. </field>
  25. </record>
  26. <record id="view_users_form" model="ir.ui.view">
  27. <field name="inherit_id" ref="base.view_users_form"/>
  28. <field name="name">res.users.form</field>
  29. <field name="model">res.users</field>
  30. <field name="arch" type="xml">
  31. <field name="active" position="replace">
  32. <field name="active" widget="boolean_switch" readonly="0"
  33. options="{'quick_edit': True, 'extra': {'onText': 'Yes', 'offText': 'No'}}"/>
  34. </field>
  35. </field>
  36. </record>
  37. <record id="view_users_tree_editable" model="ir.ui.view">
  38. <field name="name">res.users.tree</field>
  39. <field name="model">res.users</field>
  40. <field name="arch" type="xml">
  41. <tree string="Users" editable="top">
  42. <field name="name"/>
  43. <field name="login"/>
  44. <field name="lang"/>
  45. <field name="active" widget="boolean_switch"
  46. options="{'quick_edit': True, 'extra': {'onText': 'Yes', 'offText': 'No'}}"/>
  47. </tree>
  48. </field>
  49. </record>
  50. <record id="action_res_users_tree_editable" model="ir.actions.act_window">
  51. <field name="name">Tree Editable Users</field>
  52. <field name="type">ir.actions.act_window</field>
  53. <field name="res_model">res.users</field>
  54. <field name="view_type">form</field>
  55. <field name="view_id" ref="view_users_tree_editable"/>
  56. <field name="search_view_id" ref="base.view_users_search"/>
  57. </record>
  58. <record id="action_res_users_tree_view_editable" model="ir.actions.act_window.view">
  59. <field eval="10" name="sequence"/>
  60. <field name="view_mode">tree</field>
  61. <field name="view_id" ref="view_users_tree_editable"/>
  62. <field name="act_window_id" ref="action_res_users_tree_editable"/>
  63. </record>
  64. <menuitem action="action_res_users_tree_editable"
  65. id="menu_action_res_users_tree_editable"
  66. parent="base.menu_users"/>
  67. </data>
  68. </openerp>