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.

73 lines
3.3 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Asterisk Click2dial module for OpenERP
  4. Copyright (C) 2010-2013 Alexis de Lattre <alexis@via.ecp.fr>
  5. The licence is in the file __openerp__.py
  6. Inherit partner views to add 'Dial' button next to 'phone'
  7. and 'mobile' fields
  8. -->
  9. <openerp>
  10. <data>
  11. <record id="asterisk_res_partner_simplified_form_dial" model="ir.ui.view">
  12. <field name="name">asterisk.res.partner.simplified.form.dial</field>
  13. <field name="model">res.partner</field>
  14. <field name="priority">15</field>
  15. <field name="inherit_id" ref="base.view_partner_simple_form"/>
  16. <field name="arch" type="xml">
  17. <field name="phone" position="replace">
  18. <group colspan="2" col="8">
  19. <field name="phone" widget="phone" colspan="7" />
  20. <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/>
  21. </group>
  22. </field>
  23. <field name="mobile" position="replace">
  24. <group colspan="2" col="8">
  25. <field name="mobile" widget="phone" colspan="7" />
  26. <button name="action_dial" context="{'field2dial': 'mobile'}" string="Dial" type="object" attrs="{'invisible':[('mobile','=',False)]}"/>
  27. </group>
  28. </field>
  29. </field>
  30. </record>
  31. <record id="asterisk_res_partner_form_dial" model="ir.ui.view">
  32. <field name="name">asterisk.res.partner.form.dial</field>
  33. <field name="model">res.partner</field>
  34. <field name="priority">15</field>
  35. <field name="inherit_id" ref="base.view_partner_form"/>
  36. <field name="arch" type="xml">
  37. <xpath expr="//group/group/field[@name='phone']" position="replace">
  38. <group colspan="2" col="8">
  39. <field name="phone" widget="phone" colspan="7" />
  40. <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/>
  41. </group>
  42. </xpath>
  43. <xpath expr="//group/group/field[@name='mobile']" position="replace">
  44. <group colspan="2" col="8">
  45. <field name="mobile" widget="phone" colspan="7" />
  46. <button name="action_dial" context="{'field2dial': 'mobile'}" string="Dial" type="object" attrs="{'invisible':[('mobile','=',False)]}"/>
  47. </group>
  48. </xpath>
  49. <xpath expr="//group/group/field[@name='fax']" position="attributes">
  50. <attribute name="widget">fax</attribute>
  51. </xpath>
  52. <xpath expr="//form[@string='Contact']/sheet/group/field[@name='phone']" position="replace">
  53. <group colspan="2" col="8">
  54. <field name="phone" widget="phone" colspan="7" />
  55. <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/>
  56. </group>
  57. </xpath>
  58. <xpath expr="//form[@string='Contact']/sheet/group/field[@name='mobile']" position="replace">
  59. <group colspan="2" col="8">
  60. <field name="mobile" widget="phone" colspan="7" />
  61. <button name="action_dial" context="{'field2dial': 'mobile'}" string="Dial" type="object" attrs="{'invisible':[('mobile','=',False)]}"/>
  62. </group>
  63. </xpath>
  64. </field>
  65. </record>
  66. </data>
  67. </openerp>