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
3.7 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record id="tree_res_partner_relation_all" model="ir.ui.view">
  5. <field name="model">res.partner.relation.all</field>
  6. <field name="arch" type="xml">
  7. <tree
  8. string="Partner Relations"
  9. colors="gray:not active; blue:date_start &gt; current_date"
  10. editable="top"
  11. >
  12. <field
  13. name="this_partner_id"
  14. required="True"
  15. options="{'no_create': True}"
  16. />
  17. <field
  18. name="type_selection_id"
  19. required="True"
  20. options="{'no_create': True}"
  21. />
  22. <field
  23. name="other_partner_id"
  24. required="True"
  25. options="{'no_create': True}"
  26. />
  27. <field name="date_start" />
  28. <field name="date_end" />
  29. <field name="active" invisible="1" />
  30. </tree>
  31. </field>
  32. </record>
  33. <record id="search_res_partner_relation_all" model="ir.ui.view">
  34. <field name="model">res.partner.relation.all</field>
  35. <field name="arch" type="xml">
  36. <search string="Search Relations">
  37. <field name="any_partner_id" widget="many2one"/>
  38. <field name="this_partner_id"/>
  39. <field name="other_partner_id"/>
  40. <field name="type_selection_id"/>
  41. <filter
  42. string="Left to right"
  43. domain="[('record_type', '=', 'a')]"
  44. />
  45. <filter
  46. string="Right to left"
  47. domain="[('record_type', '=', 'b')]"
  48. />
  49. <filter
  50. string="Include past records"
  51. context="{'active_test': False}"
  52. />
  53. <group expand="0" string="Group By">
  54. <filter
  55. string="One Partner"
  56. context="{'group_by': 'this_partner_id'}"
  57. />
  58. <filter
  59. string="Relationship Type"
  60. context="{'group_by': 'type_selection_id'}"
  61. />
  62. <filter
  63. string="Other Partner"
  64. context="{'group_by': 'other_partner_id'}"
  65. />
  66. </group>
  67. </search>
  68. </field>
  69. </record>
  70. <record
  71. id="action_res_partner_relation_all"
  72. model="ir.actions.act_window"
  73. >
  74. <field name="name">Relations</field>
  75. <field name="res_model">res.partner.relation.all</field>
  76. <field name="view_type">form</field>
  77. <field name="view_mode">tree</field>
  78. <field name="view_id" ref="tree_res_partner_relation_all"/>
  79. <field
  80. name="search_view_id"
  81. ref="search_res_partner_relation_all"
  82. />
  83. <field name="help" type="html">
  84. <p class="oe_view_nocontent_create">
  85. Record and track your partners' relations. Relations may
  86. be linked to other partners with a type either directly
  87. or inversely.
  88. </p>
  89. </field>
  90. </record>
  91. </data>
  92. </openerp>