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.

70 lines
3.2 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" colspan="7" />
  20. <button name="action_dial" context="{'field2dial': ['phone', 'phone_e164']}" 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" colspan="7" />
  26. <button name="action_dial" context="{'field2dial': ['mobile', 'mobile_e164']}" 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" colspan="7" />
  40. <button name="action_dial" context="{'field2dial': ['phone', 'phone_e164']}" 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" colspan="7" />
  46. <button name="action_dial" context="{'field2dial': ['mobile', 'mobile_e164']}" string="Dial" type="object" attrs="{'invisible':[('mobile','=',False)]}"/>
  47. </group>
  48. </xpath>
  49. <xpath expr="//form[@string='Contact']/sheet/group/field[@name='phone']" position="replace">
  50. <group colspan="2" col="8">
  51. <field name="phone" colspan="7" />
  52. <button name="action_dial" context="{'field2dial': ['phone', 'phone_e164']}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/>
  53. </group>
  54. </xpath>
  55. <xpath expr="//form[@string='Contact']/sheet/group/field[@name='mobile']" position="replace">
  56. <group colspan="2" col="8">
  57. <field name="mobile" colspan="7" />
  58. <button name="action_dial" context="{'field2dial': ['mobile', 'mobile_e164']}" string="Dial" type="object" attrs="{'invisible':[('mobile','=',False)]}"/>
  59. </group>
  60. </xpath>
  61. </field>
  62. </record>
  63. </data>
  64. </openerp>