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.

54 lines
2.1 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- © 2015 Antiun Ingenieria S.L. - Javier Iniesta
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
  4. <openerp>
  5. <data>
  6. <record model="ir.ui.view" id="view_partner_form_sector">
  7. <field name="name">Partner form with sector</field>
  8. <field name="model">res.partner</field>
  9. <field name="inherit_id" ref="base.view_partner_form"/>
  10. <field name="arch" type="xml">
  11. <field name="phone" position="before">
  12. <field name="sector_id" placeholder="Sector"
  13. options='{"no_open": True}'
  14. attrs="{'invisible': [('is_company', '=', False)]}"/>
  15. <field name="secondary_sector_ids" widget="many2many_tags"
  16. attrs="{'invisible': [('is_company', '=', False)]}"/>
  17. </field>
  18. </field>
  19. </record>
  20. <record model="ir.ui.view" id="view_partner_tree_sector">
  21. <field name="name">Partner tree with sector</field>
  22. <field name="model">res.partner</field>
  23. <field name="inherit_id" ref="base.view_partner_tree"/>
  24. <field name="arch" type="xml">
  25. <field name="email" position="after">
  26. <field name="sector_id"
  27. attrs="{'invisible': [('is_company', '=', False)]}"/>
  28. </field>
  29. </field>
  30. </record>
  31. <record model="ir.ui.view" id="view_res_partner_filter_sector">
  32. <field name="name">Partner search with sector</field>
  33. <field name="model">res.partner</field>
  34. <field name="inherit_id" ref="base.view_res_partner_filter"/>
  35. <field name="arch" type="xml">
  36. <field name="category_id" position="after">
  37. <field name="sector_id"
  38. string="Sector"
  39. filter_domain="['|',('sector_id','ilike',self),
  40. ('secondary_sector_ids','ilike',self)]"/>
  41. </field>
  42. <filter string="Salesperson" position="after">
  43. <filter string="Sector"
  44. domain="[('is_company','=', True)]"
  45. context="{'group_by': 'sector_id'}"/>
  46. </filter>
  47. </field>
  48. </record>
  49. </data>
  50. </openerp>