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.

115 lines
4.3 KiB

13 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Asterisk Click2dial module for OpenERP
  4. Copyright (C) 2010-2012 Alexis de Lattre <alexis@via.ecp.fr>
  5. The licence is in the file __openerp__.py
  6. Inherit partner_address views to add 'Dial' button next to 'phone'
  7. and 'mobile' fields
  8. -->
  9. <openerp>
  10. <data>
  11. <record id="asterisk_res_partner_address_dial1" model="ir.ui.view">
  12. <field name="name">asterisk.res.partner.address.dial1</field>
  13. <field name="model">res.partner.address</field>
  14. <field name="priority">15</field>
  15. <field name="inherit_id" ref="base.view_partner_address_form1"/>
  16. <field name="arch" type="xml">
  17. <data>
  18. <field name="phone" position="replace">
  19. <group colspan="2" col="8">
  20. <field name="phone" colspan="7" />
  21. <button name="action_dial_phone" string="Dial" type="object"/>
  22. </group>
  23. </field>
  24. <field name="mobile" position="replace">
  25. <group colspan="2" col="8">
  26. <field name="mobile" colspan="7" />
  27. <button name="action_dial_mobile" string="Dial" type="object"/>
  28. </group>
  29. </field>
  30. </data>
  31. </field>
  32. </record>
  33. <record id="asterisk_res_partner_address_dial2" model="ir.ui.view">
  34. <field name="name">asterisk.res.partner.address.dial2</field>
  35. <field name="model">res.partner.address</field>
  36. <field name="priority">15</field>
  37. <field name="inherit_id" ref="base.view_partner_address_form2"/>
  38. <field name="arch" type="xml">
  39. <data>
  40. <field name="phone" position="replace">
  41. <group colspan="2" col="8">
  42. <field name="phone" colspan="7" />
  43. <button name="action_dial_phone" string="Dial" type="object"/>
  44. </group>
  45. </field>
  46. <field name="mobile" position="replace">
  47. <group colspan="2" col="8">
  48. <field name="mobile" colspan="7" />
  49. <button name="action_dial_mobile" string="Dial" type="object"/>
  50. </group>
  51. </field>
  52. </data>
  53. </field>
  54. </record>
  55. <record id="asterisk_res_partner_dial" model="ir.ui.view">
  56. <field name="name">asterisk.res.partner.dial</field>
  57. <field name="model">res.partner</field>
  58. <field name="priority">15</field>
  59. <field name="inherit_id" ref="base.view_partner_form"/>
  60. <field name="arch" type="xml">
  61. <data>
  62. <field name="phone" position="replace">
  63. <group colspan="2" col="8">
  64. <field name="phone" colspan="7" />
  65. <button name="action_dial_phone" string="Dial" type="object"/>
  66. </group>
  67. </field>
  68. <field name="mobile" position="replace">
  69. <group colspan="2" col="8">
  70. <field name="mobile" colspan="7" />
  71. <button name="action_dial_mobile" string="Dial" type="object"/>
  72. </group>
  73. </field>
  74. </data>
  75. </field>
  76. </record>
  77. <!-- Get partner from incoming phone call -->
  78. <record id="view_open_calling_partner" model="ir.ui.view">
  79. <field name="name">view_open_calling_partner</field>
  80. <field name="model">wizard.open.calling.partner</field>
  81. <field name="type">form</field>
  82. <field name="arch" type="xml">
  83. <form string="Open calling partner">
  84. <field name="calling_number" readonly="1"/>
  85. <field name="partner_address_id" readonly="1" />
  86. <field name="partner_id" readonly="1" />
  87. <newline />
  88. <button name="open_partner" icon="gtk-go-forward" string="Partner form" type="object" />
  89. <button name="open_sale_orders" icon="gtk-go-forward" string="Related sale orders" type="object" />
  90. <button name="open_invoices" icon="gtk-go-forward" string="Related invoices" type="object" />
  91. <button special="cancel" icon="gtk-cancel" string="Cancel" />
  92. </form>
  93. </field>
  94. </record>
  95. <record id="action_open_calling_partner" model="ir.actions.act_window">
  96. <field name="name">Open calling partner</field>
  97. <field name="res_model">wizard.open.calling.partner</field>
  98. <field name="view_type">form</field>
  99. <field name="view_mode">form</field>
  100. <field name="target">new</field>
  101. </record>
  102. <menuitem id="menu_open_calling_partner_sales" parent="base.menu_address_book" action="action_open_calling_partner" sequence="50" />
  103. </data>
  104. </openerp>