button_show_config.xml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <openerp>
  2. <data>
  3. <!-- explicit list view definition -->
  4. <record model="ir.ui.view" id="archives_button_show_config_list">
  5. <field name="name">按钮显示设置列表</field>
  6. <field name="model">archives.button_show_config</field>
  7. <field name="arch" type="xml">
  8. <tree>
  9. <field name="name"/>
  10. <!-- <field name="coding"/>-->
  11. <!-- <field name="company_id"/>-->
  12. <field name="button_type"/>
  13. <field name="available"/>
  14. </tree>
  15. </field>
  16. </record>
  17. <record model="ir.ui.view" id="archives_button_show_config_edit">
  18. <field name="name">按钮显示设置新建</field>
  19. <field name="model">archives.button_show_config</field>
  20. <field name="arch" type="xml">
  21. <form>
  22. <header>
  23. <field name="id" attrs="{'invisible': True}"/>
  24. <field name="available" attrs="{'invisible': True}"/>
  25. <button name="set_available" string="启用" type="object" class="oe_highlight oe_read_only"
  26. attrs="{'invisible': [('available','==',True)]}"/>
  27. <button name="un_set_available" string="停用" type="object" class="oe_highlight oe_read_only"
  28. attrs="{'invisible': [('available','==',False)]}"/>
  29. </header>
  30. <sheet>
  31. <group name="group_top" col='4'>
  32. <field name="name"/>
  33. <field name="button_type"/>
  34. </group>
  35. <notebook>
  36. <page string="按钮显示设置信息">
  37. <field name="detail" mode="tree">
  38. <tree editable="bottom">
  39. <field name="cus_model_id" options="{'no_open':True,'no_create':True}"/>
  40. <field name="remark"/>
  41. </tree>
  42. </field>
  43. </page>
  44. </notebook>
  45. </sheet>
  46. </form>
  47. </field>
  48. </record>
  49. <record model="ir.ui.view" id="button_show_config_search_view">
  50. <field name="name">archives.button_show_config.search</field>
  51. <field name="model">archives.button_show_config</field>
  52. <field name="arch" type="xml">
  53. <search>
  54. <field name="name"/>
  55. <group string="Group By">
  56. <filter name="by_button_type" string="按钮类型"
  57. context="{'group_by': 'button_type'}"/>
  58. </group>
  59. </search>
  60. </field>
  61. </record>
  62. <!-- actions opening views on models -->
  63. <record model="ir.actions.act_window" id="archives_button_show_config_action_window">
  64. <field name="name">按钮显示设置</field>
  65. <field name="res_model">archives.button_show_config</field>
  66. <field name="view_mode">tree,form</field>
  67. </record>
  68. <!-- actions -->
  69. <menuitem name="按钮显示设置" id="archives.menu_button_show_config" parent="archives.menu_system"
  70. action="archives_button_show_config_action_window" sequence='26'/>
  71. </data>
  72. </openerp>