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.

153 lines
7.3 KiB

  1. <openerp>
  2. <data>
  3. #---------------------------------------------------------------------------------------------------------
  4. # Search Address
  5. #---------------------------------------------------------------------------------------------------------
  6. <record id="view_res_partner_address_filter" model="ir.ui.view">
  7. <field name="name">res.partner.address.select</field>
  8. <field name="model">res.partner.address</field>
  9. <field name="inherit_id" ref="base.view_res_partner_address_filter" />
  10. <field name="type">search</field>
  11. <field name="arch" type="xml">
  12. <field name="country_id" position="after" >
  13. <field name="category_id" />
  14. </field>
  15. </field>
  16. </record>
  17. #---------------------------------------------------------------------------------------------------------
  18. # Partner form->contact and view of address
  19. #---------------------------------------------------------------------------------------------------------
  20. <record model="ir.ui.view" id="view_partner_address_categ_form1_inherit">
  21. <field name="name">res.partner.address.form1.c2c_partner_adress</field>
  22. <field name="model">res.partner.address</field>
  23. <field name="type">form</field>
  24. <field name="inherit_id" ref="base.view_partner_address_form1" />
  25. <field name="priority" eval="17" />
  26. <field name="arch" type="xml">
  27. <xpath expr="/form/group[3]" position="after">
  28. <group colspan="4">
  29. <separator string="Address Categories" colspan="4"/>
  30. <field name="category_id" nolabel="1"/>
  31. </group>
  32. </xpath>
  33. </field>
  34. </record>
  35. <!--
  36. =========================================
  37. the short form used in the partner form
  38. =========================================
  39. -->
  40. <record model="ir.ui.view" id="view_partner_address_form2_inerit_categ">
  41. <field name="name">res.partner.address.form2_c2c_partner_address</field>
  42. <field name="model">res.partner.address</field>
  43. <field name="type">form</field>
  44. <field name="inherit_id" ref="base.view_partner_address_form2" />
  45. <field name="priority" eval="17" />
  46. <field name="arch" type="xml">
  47. <xpath expr="/form/field[@name='email']" position="after">
  48. <newline/>
  49. <separator string="Address Categories" colspan="4"/>
  50. <field name="category_id" nolabel="1"/>
  51. </xpath>
  52. </field>
  53. </record>
  54. <!--
  55. =========================================
  56. the short form used in the res_partner stdandard form
  57. =========================================
  58. -->
  59. <record model="ir.ui.view" id="view_partner_form_inherite_categ_infos">
  60. <field name="name">res.partner.form_partner</field>
  61. <field name="model">res.partner</field>
  62. <field name="type">form</field>
  63. <field name="inherit_id" ref="base.view_partner_form" />
  64. <field name="arch" type="xml">
  65. <xpath expr="/form/notebook/page[@string='General']/field[@name='address']/form[@string='Partner Contacts']/group[3]" position="after">
  66. <group colspan="4" >
  67. <separator string="Address Categories" colspan="4"/>
  68. <field name="category_id" nolabel="1"/>
  69. </group>
  70. </xpath>
  71. </field>
  72. </record>
  73. <!--
  74. ======================
  75. Adresses categories
  76. ======================
  77. -->
  78. <record model="ir.ui.view" id="view_partner_address_category_form">
  79. <field name="name">res.partner.address.category.form</field>
  80. <field name="model">res.partner.address.category</field>
  81. <field name="type">form</field>
  82. <field name="arch" type="xml">
  83. <form string="Partner categories">
  84. <field name="name" select="1"/>
  85. <field name="active" select="1" />
  86. <field name="parent_id"/>
  87. </form>
  88. </field>
  89. </record>
  90. <record model="ir.ui.view" id="view_partner_address_category_list">
  91. <field name="name">res.partner.address.category.list</field>
  92. <field name="model">res.partner.address.category</field>
  93. <field name="type">tree</field>
  94. <field name="priority" eval="6"/>
  95. <field name="arch" type="xml">
  96. <tree string="Partner categories">
  97. <field name="complete_name"/>
  98. </tree>
  99. </field>
  100. </record>
  101. <record model="ir.ui.view" id="view_partner_address_category_tree">
  102. <field name="name">res.partner.address.category.tree</field>
  103. <field name="model">res.partner.address.category</field>
  104. <field name="type">tree</field>
  105. <field name="field_parent">child_ids</field>
  106. <field name="arch" type="xml">
  107. <tree string="Partner Categories">
  108. <field name="name"/>
  109. </tree>
  110. </field>
  111. </record>
  112. <record model="ir.actions.act_window" id="action_partner_address_category">
  113. <field name="name">Address categories</field>
  114. <field name="type">ir.actions.act_window</field>
  115. <field name="res_model">res.partner.address.category</field>
  116. <field name="view_type">tree</field>
  117. <field name="view_id" ref="view_partner_address_category_tree"/>
  118. <field name="domain">[('parent_id','=',False)]</field>
  119. </record>
  120. <menuitem parent="base.menu_address_book" action="action_partner_address_category" id="menu_partner_address_category"/>
  121. <record model="ir.actions.act_window" id="action_partner_by_category">
  122. <field name="res_model">res.partner.address</field>
  123. <field name="view_type">form</field>
  124. <field name="view_mode">tree,form</field>
  125. <field name="domain">[('category_id','child_of', [active_id])]</field>
  126. </record>
  127. <record model="ir.values" id="ir_action_partner_by_category">
  128. <field name="key2" eval="'tree_but_open'"/>
  129. <field name="model" eval="'res.partner.address.category'"/>
  130. <field name="name">Open partners</field>
  131. <field name="value" eval="'ir.actions.act_window,%d'%action_partner_by_category"/>
  132. <field name="object" eval="True"/>
  133. </record>
  134. <record model="ir.actions.act_window" id="action_partner_address_category_form">
  135. <field name="name">Address categories</field>
  136. <field name="type">ir.actions.act_window</field>
  137. <field name="res_model">res.partner.address.category</field>
  138. <field name="view_type">form</field>
  139. </record>
  140. <menuitem parent="base.menu_config_address_book" action="action_partner_address_category_form" id="menu_partner_address_category_form"/>
  141. </data>
  142. </openerp>