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.

57 lines
2.4 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. Copyright (C) 2010-2013 Invitu <contact@invitu.com>
  6. The licence is in the file __openerp__.py
  7. Inherit lead views to add 'Dial' button next to 'phone'
  8. and 'mobile' fields
  9. -->
  10. <openerp>
  11. <data>
  12. <record id="asterisk_crm_lead_simplified_form_dial" model="ir.ui.view">
  13. <field name="name">asterisk.crm_lead.simplified.form.dial</field>
  14. <field name="model">crm.lead</field>
  15. <field name="inherit_id" ref="crm.crm_case_form_view_leads"/>
  16. <field name="arch" type="xml">
  17. <xpath expr="//group/group/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. </xpath>
  23. <xpath expr="//group/group/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. </xpath>
  29. </field>
  30. </record>
  31. <record id="asterisk_crm_case_form_view_oppor_dial" model="ir.ui.view">
  32. <field name="name">asterisk.crm_case.form.view_oppor.dial</field>
  33. <field name="model">crm.lead</field>
  34. <field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
  35. <field name="arch" type="xml">
  36. <xpath expr="//group/group/field[@name='phone']" position="replace">
  37. <group colspan="2" col="8">
  38. <field name="phone" widget="phone" colspan="7" />
  39. <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/>
  40. </group>
  41. </xpath>
  42. <xpath expr="//group/group/field[@name='mobile']" position="replace">
  43. <group colspan="2" col="8">
  44. <field name="mobile" widget="phone" colspan="7" />
  45. <button name="action_dial" context="{'field2dial': 'mobile'}" string="Dial" type="object" attrs="{'invisible':[('mobile','=',False)]}"/>
  46. </group>
  47. </xpath>
  48. </field>
  49. </record>
  50. </data>
  51. </openerp>