customer_zone2.xml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <openerp>
  2. <data>
  3. <!-- explicit list view definition -->
  4. <record model="ir.ui.view" id="archives_customer_zone2_list">
  5. <field name="name">客户地区2列表</field>
  6. <field name="model">archives.customer_zone2</field>
  7. <field name="arch" type="xml">
  8. <tree>
  9. <field name="name"/>
  10. <field name="coding"/>
  11. <field name="customer_zone3"/>
  12. <field name="company_id"/>
  13. <field name="available"/>
  14. </tree>
  15. </field>
  16. </record>
  17. <record model="ir.ui.view" id="archives_customer_zone2_edit">
  18. <field name="name">客户地区2新建</field>
  19. <field name="model">archives.customer_zone2</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="coding"/>
  34. <field name="customer_zone3" options="{'no_open':True,'no_create':True}"/>
  35. <field name="company_id" options="{'no_open':True,'no_create':True}"/>
  36. </group>
  37. </sheet>
  38. </form>
  39. </field>
  40. </record>
  41. <record model="ir.ui.view" id="customer_zone2_search_view">
  42. <field name="name">archives.customer_zone2.search</field>
  43. <field name="model">archives.customer_zone2</field>
  44. <field name="arch" type="xml">
  45. <search>
  46. <field name="name" filter_domain="['|', ('spell', 'ilike', self), ('name', 'ilike', self)]"/>
  47. <field name="coding"/>
  48. <field name="customer_zone3"/>
  49. <field name="company_id"/>
  50. </search>
  51. </field>
  52. </record>
  53. <!-- actions opening views on models -->
  54. <record model="ir.actions.act_window" id="archives_customer_zone2_action_window">
  55. <field name="name">客户地区2</field>
  56. <field name="res_model">archives.customer_zone2</field>
  57. <field name="view_mode">tree,form</field>
  58. </record>
  59. <!-- actions -->
  60. <menuitem name="客户地区2" id="archives.menu_customer_zone2" parent="archives_menu_sale"
  61. action="archives_customer_zone2_action_window" sequence="5"/>
  62. </data>
  63. </openerp>