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.

55 lines
2.3 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Asterisk Click2dial CRM Claim module for OpenERP
  4. Copyright (C) 2013 Invitu <contact@invitu.com>
  5. The licence is in the file __openerp__.py
  6. Inherit event registration view to add 'Dial' button next to 'phone'
  7. field
  8. -->
  9. <openerp>
  10. <data>
  11. <record id="asterisk_event_registration_form_dial" model="ir.ui.view">
  12. <field name="name">asterisk.event.registration.form.dial</field>
  13. <field name="model">event.registration</field>
  14. <field name="inherit_id" ref="event.view_event_registration_form"/>
  15. <field name="arch" type="xml">
  16. <field name="phone" position="replace">
  17. <group colspan="2" col="3">
  18. <field name="phone" widget="phone" colspan="2" />
  19. <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/>
  20. </group>
  21. </field>
  22. </field>
  23. </record>
  24. <record id="asterisk_event_form_registration_tree_dial" model="ir.ui.view">
  25. <field name="name">asterisk.event.form.registration.tree.dial</field>
  26. <field name="model">event.event</field>
  27. <field name="inherit_id" ref="event.view_event_form"/>
  28. <field name="arch" type="xml">
  29. <xpath expr="//field[@name='registration_ids']/tree/field[@name='phone']" position="replace">
  30. <field name="phone" widget="phone" colspan="2" />
  31. <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" icon="terp-call-start" attrs="{'invisible':[('phone','=',False)]}"/>
  32. </xpath>
  33. </field>
  34. </record>
  35. <record id="asterisk_event_form_registration_form_dial" model="ir.ui.view">
  36. <field name="name">asterisk.event.form.registration.form.dial</field>
  37. <field name="model">event.event</field>
  38. <field name="inherit_id" ref="event.view_event_form"/>
  39. <field name="arch" type="xml">
  40. <xpath expr="//field[@name='registration_ids']/form/group/field[@name='phone']" position="replace">
  41. <group colspan="2" col="3">
  42. <field name="phone" widget="phone" colspan="2" />
  43. <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/>
  44. </group>
  45. </xpath>
  46. </field>
  47. </record>
  48. </data>
  49. </openerp>