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.

53 lines
2.3 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  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. <odoo>
  5. <record model="ir.ui.view" id="view_partner_form_sector">
  6. <field name="name">Partner form with sector</field>
  7. <field name="model">res.partner</field>
  8. <field name="inherit_id" ref="base.view_partner_form"/>
  9. <field name="arch" type="xml">
  10. <field name="phone" position="before">
  11. <field name="sector_id" placeholder="Sector"
  12. options='{"no_open": True}'
  13. attrs="{'invisible': [('is_company', '=', False)]}"/>
  14. <field name="secondary_sector_ids" widget="many2many_tags"
  15. attrs="{'invisible': [('is_company', '=', False)]}"/>
  16. </field>
  17. </field>
  18. </record>
  19. <record model="ir.ui.view" id="view_partner_tree_sector">
  20. <field name="name">Partner tree with sector</field>
  21. <field name="model">res.partner</field>
  22. <field name="inherit_id" ref="base.view_partner_tree"/>
  23. <field name="arch" type="xml">
  24. <field name="email" position="after">
  25. <field name="sector_id"
  26. attrs="{'invisible': [('is_company', '=', False)]}"/>
  27. </field>
  28. </field>
  29. </record>
  30. <record model="ir.ui.view" id="view_res_partner_filter_sector">
  31. <field name="name">Partner search with sector</field>
  32. <field name="model">res.partner</field>
  33. <field name="inherit_id" ref="base.view_res_partner_filter"/>
  34. <field name="arch" type="xml">
  35. <field name="category_id" position="after">
  36. <field name="sector_id"
  37. string="Sector"
  38. filter_domain="['|',('sector_id','ilike',self),
  39. ('secondary_sector_ids','ilike',self)]"/>
  40. </field>
  41. <filter name="salesperson" position="after">
  42. <filter name="sector"
  43. string="Sector"
  44. domain="[('is_company','=', True)]"
  45. context="{'group_by': 'sector_id'}"/>
  46. </filter>
  47. </field>
  48. </record>
  49. </odoo>