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.

45 lines
1.8 KiB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <odoo>
  3. <!-- Add phone number extension fields for partner -->
  4. <record id="view_partner_simple_form" model="ir.ui.view">
  5. <field name="name">view.partner.simple.number.extension.form</field>
  6. <field name="model">res.partner</field>
  7. <field name="inherit_id" ref="base.view_partner_simple_form" />
  8. <field name="arch" type="xml">
  9. <field name="phone" position="after">
  10. <field name="phone_extension" string="Extn." />
  11. </field>
  12. </field>
  13. </record>
  14. <record id="view_partner_form" model="ir.ui.view">
  15. <field name="name">view.partner.number.extension.form</field>
  16. <field name="model">res.partner</field>
  17. <field name="inherit_id" ref="base.view_partner_form" />
  18. <field name="arch" type="xml">
  19. <field name="phone" position="after">
  20. <field name="phone_extension" string="Extn." />
  21. </field>
  22. <xpath
  23. expr="/form/sheet/notebook/page/field/kanban/field[@name='phone']"
  24. position="after"
  25. >
  26. <field name="phone_extension" />
  27. </xpath>
  28. <xpath
  29. expr="//div[hasclass('oe_kanban_details')]/div[@t-if='record.phone.raw_value']"
  30. position="after"
  31. >
  32. <div t-if="record.phone_extension.raw_value">
  33. Ext:
  34. <field name="phone_extension" />
  35. </div>
  36. </xpath>
  37. <xpath
  38. expr="/form/sheet/notebook/page/field/form/sheet/group/group/field[@name='phone']"
  39. position="after"
  40. >
  41. <field name="phone_extension" string="Extn." />
  42. </xpath>
  43. </field>
  44. </record>
  45. </odoo>