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.

47 lines
2.0 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="view_event_registration_form" 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_phone.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="view_event_form" 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_phone.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" 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. <xpath expr="//field[@name='registration_ids']/form//field[@name='phone']" position="replace">
  34. <group colspan="2" col="3">
  35. <field name="phone" widget="phone" colspan="2" />
  36. <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/>
  37. </group>
  38. </xpath>
  39. </field>
  40. </record>
  41. </data>
  42. </openerp>