subordinate_customer.xml 3.4 KB

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