customer_zone.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <openerp>
  2. <data>
  3. <!-- explicit list view definition -->
  4. <record model="ir.ui.view" id="archives_customer_zone_list">
  5. <field name="name">客户地区列表</field>
  6. <field name="model">archives.customer_zone</field>
  7. <field name="arch" type="xml">
  8. <tree>
  9. <field name="name"/>
  10. <field name="coding"/>
  11. <field name="outer_coding"/>
  12. <field name="customer_zone1"/>
  13. <field name="company_id"/>
  14. <field name="available"/>
  15. </tree>
  16. </field>
  17. </record>
  18. <record model="ir.ui.view" id="archives_customer_zone_edit">
  19. <field name="name">客户地区新建</field>
  20. <field name="model">archives.customer_zone</field>
  21. <field name="arch" type="xml">
  22. <form>
  23. <header>
  24. <field name="id" attrs="{'invisible': True}"/>
  25. <field name="available" attrs="{'invisible': True}"/>
  26. <button name="set_available" string="启用" type="object" class="oe_highlight oe_read_only"
  27. attrs="{'invisible': [('available','==',True)]}"/>
  28. <button name="un_set_available" string="停用" type="object" class="oe_highlight oe_read_only"
  29. attrs="{'invisible': [('available','==',False)]}"/>
  30. </header>
  31. <sheet>
  32. <group name="group_top" col='4'>
  33. <field name="name"/>
  34. <field name="coding"/>
  35. <field name="outer_coding"/>
  36. <field name="customer_zone1" options="{'no_open':True,'no_create':True}"/>
  37. <field name="company_id" options="{'no_open':True,'no_create':True}"/>
  38. </group>
  39. </sheet>
  40. </form>
  41. </field>
  42. </record>
  43. <record model="ir.ui.view" id="customer_zone_search_view">
  44. <field name="name">archives.customer_zone.search</field>
  45. <field name="model">archives.customer_zone</field>
  46. <field name="arch" type="xml">
  47. <search>
  48. <field name="name" filter_domain="['|', ('spell', 'ilike', self), ('name', 'ilike', self)]"/>
  49. <field name="coding"/>
  50. <field name="customer_zone1"/>
  51. <field name="company_id"/>
  52. </search>
  53. </field>
  54. </record>
  55. <!-- actions opening views on models -->
  56. <record model="ir.actions.act_window" id="archives_customer_zone_action_window">
  57. <field name="name">客户地区</field>
  58. <field name="res_model">archives.customer_zone</field>
  59. <field name="view_mode">tree,form</field>
  60. </record>
  61. <!-- actions -->
  62. <menuitem name="客户地区" id="archives.menu_customer_zone" parent="archives_menu_sale"
  63. action="archives_customer_zone_action_window" sequence="3"/>
  64. </data>
  65. </openerp>