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.

96 lines
4.7 KiB

  1. <openerp>
  2. <data>
  3. <record id="view_res_partner_filter" model="ir.ui.view">
  4. <field name="inherit_id" ref="base.view_res_partner_filter" />
  5. <field name="model">res.partner</field>
  6. <field type="xml" name="arch">
  7. <data>
  8. <field name="parent_id" position="after">
  9. <field name="search_relation_partner_id" />
  10. <field name="search_relation_id" />
  11. <field name="search_relation_date" />
  12. <field name="search_relation_partner_category_id" />
  13. </field>
  14. </data>
  15. </field>
  16. </record>
  17. <record id="view_partner_form" model="ir.ui.view">
  18. <field name="inherit_id" ref="base.view_partner_form" />
  19. <field name="model">res.partner</field>
  20. <field type="xml" name="arch">
  21. <data>
  22. <xpath expr="//sheet/notebook" position="inside">
  23. <page string="Relations">
  24. <field
  25. name="relation_ids"
  26. context="{
  27. 'active_model': 'res.partner',
  28. 'active_id': id, 'active_ids': [id],
  29. 'active_test': False,
  30. }"
  31. >
  32. <tree
  33. editable="top"
  34. colors="gray:is_relation_expired==True or not active;blue:is_relation_future==True"
  35. >
  36. <field
  37. name="type_selection_id"
  38. required="True"
  39. context="{
  40. 'parent_model': 'res.partner',
  41. 'parent_id': parent.id,
  42. }"
  43. domain="[
  44. '|',
  45. ('contact_type_this', '=', parent.is_company and 'c' or 'p'),
  46. ('contact_type_this', '=', False),
  47. ('search_partner_category_this', '=', parent.category_id),
  48. ]
  49. "
  50. options="{'create': false, 'create_edit': false}"
  51. on_change="on_change_type_selection_id(type_selection_id)"
  52. />
  53. <field name="type_id" invisible="True" />
  54. <field
  55. name="partner_id_display"
  56. required="True"
  57. attrs="{
  58. 'readonly': [('type_selection_id','=',False)],
  59. }"
  60. options="{'create': false, 'create_edit': false}"
  61. widget="many2one_clickable"
  62. />
  63. <field
  64. name="date_start"
  65. />
  66. <field
  67. name="date_end"
  68. />
  69. <field
  70. name="active"
  71. />
  72. <field
  73. name="is_relation_expired"
  74. invisible="True"
  75. />
  76. <field
  77. name="is_relation_future"
  78. invisible="True"
  79. />
  80. </tree>
  81. </field>
  82. </page>
  83. </xpath>
  84. </data>
  85. </field>
  86. </record>
  87. <act_window id="action_show_partner_relations"
  88. name="Show partner's relations"
  89. src_model="res.partner"
  90. res_model="res.partner.relation.all"
  91. domain="[('this_partner_id', 'in', active_ids)]"
  92. key2="client_action_multi" />
  93. </data>
  94. </openerp>