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.

79 lines
3.7 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="arch" type="xml">
  19. <field name="login" position="after">
  20. <field name="active" widget="boolean_switch"
  21. attrs="{'readonly': [('login', '=', 'admin')]}"
  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"
  34. attrs="{'readonly': [('login', '=', 'admin')]}"
  35. options="{'quick_edit': True, 'extra': {'onText': 'Yes', 'offText': 'No'}}"
  36. context="{'test': 'test value'}"/>
  37. </field>
  38. </field>
  39. </record>
  40. <record id="view_users_tree_editable" model="ir.ui.view">
  41. <field name="name">res.users.tree</field>
  42. <field name="model">res.users</field>
  43. <field name="arch" type="xml">
  44. <tree string="Users" editable="top" version="7.0">
  45. <field name="name"/>
  46. <field name="login"/>
  47. <field name="lang"/>
  48. <field name="active" widget="boolean_switch"
  49. tabindex="-1"
  50. attrs="{'readonly': [('login', '=', 'admin')]}"
  51. options="{'quick_edit': True, 'extra': {'onText': 'Yes', 'offText': 'No'}}"
  52. context="{'test': 'test value'}" />
  53. </tree>
  54. </field>
  55. </record>
  56. <record id="action_res_users_tree_editable" model="ir.actions.act_window">
  57. <field name="name">Tree Editable Users</field>
  58. <field name="type">ir.actions.act_window</field>
  59. <field name="res_model">res.users</field>
  60. <field name="view_type">form</field>
  61. <field name="view_id" ref="view_users_tree_editable"/>
  62. <field name="search_view_id" ref="base.view_users_search"/>
  63. </record>
  64. <record id="action_res_users_tree_view_editable" model="ir.actions.act_window.view">
  65. <field eval="10" name="sequence"/>
  66. <field name="view_mode">tree</field>
  67. <field name="view_id" ref="view_users_tree_editable"/>
  68. <field name="act_window_id" ref="action_res_users_tree_editable"/>
  69. </record>
  70. <menuitem action="action_res_users_tree_editable"
  71. id="menu_action_res_users_tree_editable"
  72. parent="base.menu_users"/>
  73. </data>
  74. </openerp>