res_partner_view.xml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_partner_form_agent" model="ir.ui.view">
  5. <field name="name">res.partner.form.agent</field>
  6. <field name="model">res.partner</field>
  7. <field name="inherit_id" ref="base.view_partner_form" />
  8. <field name="priority" eval="18"/>
  9. <field name="groups_id" eval="[(4, ref('base.group_sale_salesman'))]"/>
  10. <field name="arch" type="xml">
  11. <xpath expr="//page[@name='sales_purchases']//field[@name='supplier']" position="after">
  12. <field name="agent" string="Agent" />
  13. </xpath>
  14. <field name="user_id" position="after">
  15. <field name="agents"
  16. attrs="{'invisible': [('customer', '=', False)]}"
  17. widget="many2many_tags"/>
  18. </field>
  19. <page name="sales_purchases" position="after">
  20. <page name="agent_information"
  21. string="Agent information"
  22. attrs="{'invisible': [('agent', '=', False)]}">
  23. <group>
  24. <group>
  25. <field name="agent_type"/>
  26. <field name="commission"
  27. attrs="{'required': [('agent', '=', True)]}"/>
  28. </group>
  29. </group>
  30. </page>
  31. </page>
  32. </field>
  33. </record>
  34. </data>
  35. </openerp>