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.

56 lines
2.0 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  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 name="mode">extension</field>
  7. <field type="xml" name="arch">
  8. <!-- Default type_person also contains invoice and delivery
  9. addresses for companies (and persons). -->
  10. <filter name="type_person" position="attributes">
  11. <attribute
  12. name="domain"
  13. >[('is_company', '=', False), ('type', '=', 'contact')]</attribute>
  14. </filter>
  15. <!-- Change string of Company filter to Organisations. -->
  16. <filter name="type_company" position="attributes">
  17. <attribute name="string">Organisations</attribute>
  18. </filter>
  19. <!-- Add extra filters. -->
  20. <filter name="inactive" position="after">
  21. <separator />
  22. <filter
  23. string="With email"
  24. name="filter_email"
  25. domain="[('email', '!=', False)]"
  26. />
  27. <filter
  28. string="With address"
  29. name="filter_address"
  30. domain="[('street', '!=', False), ('street', '!=', ''),
  31. ('city', '!=', False), ('city', '!=', '')]"
  32. />
  33. </filter>
  34. <!-- Add extra groupings. -->
  35. <filter name="group_country" position="after">
  36. <filter
  37. name="group_city"
  38. string="City"
  39. context="{'group_by': 'city'}"
  40. />
  41. <filter
  42. name="group_organisation"
  43. string="Organisation"
  44. context="{'group_by': 'commercial_partner_id'}"
  45. />
  46. </filter>
  47. </field>
  48. </record>
  49. </odoo>