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.

72 lines
3.8 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Asterisk Click2dial module for OpenERP
  4. Copyright (C) 2012-2013 Alexis de Lattre <alexis@via.ecp.fr>
  5. The licence is in the file __terp__.py
  6. -->
  7. <openerp>
  8. <data>
  9. <!-- Get partner from incoming phone call -->
  10. <record id="view_open_calling_partner" model="ir.ui.view">
  11. <field name="name">view_open_calling_partner</field>
  12. <field name="model">wizard.open.calling.partner</field>
  13. <field name="type">form</field>
  14. <field name="arch" type="xml">
  15. <form string="Open calling partner">
  16. <group col="5" name="fix-width-gtk-client-v50-windows">
  17. <field name="calling_number" colspan="4" />
  18. <group attrs="{'invisible':[('partner_id','=',False)]}" colspan="4">
  19. <field name="partner_address_id" />
  20. <field name="partner_id" />
  21. </group>
  22. <newline />
  23. <group colspan="4" attrs="{'invisible':[('partner_id','=',False)]}">
  24. <button name="open_partner" icon="gtk-go-forward" string="Partner form" type="object" />
  25. <button name="open_sale_orders" icon="gtk-go-forward" string="Related sale orders" type="object" />
  26. <button name="open_invoices" icon="gtk-go-forward" string="Related invoices" type="object" />
  27. <button special="cancel" icon="gtk-cancel" string="Cancel" name="cancel1"/>
  28. <newline />
  29. <label string=" " /> <!-- Hack to have the full view of the Cancel button on GTK Client v50 for Windows -->
  30. <!-- TODO : try to reimplement the scenario where the partner_address exist but not the partner ; cf the 6.1 branch -->
  31. </group>
  32. <group attrs="{'invisible':[('partner_address_id','!=',False)]}" colspan="4" col="8">
  33. <label string="No partner contact found in OpenERP with this number" colspan="8" />
  34. <separator string="Create a new contact" colspan="8" />
  35. <button name="create_partner_address_phone" icon="gtk-new" string="with calling number as phone" type="object" colspan="4"/>
  36. <button name="create_partner_address_mobile" icon="gtk-new" string="with calling number as mobile" type="object" colspan="4"/>
  37. <newline />
  38. <separator string="Update an existing contact" colspan="8" />
  39. <field name="to_update_partner_address_id" colspan="8" on_change="onchange_to_update_partner_address(to_update_partner_address_id)"/>
  40. <field name="current_phone" colspan="6"/>
  41. <button name="update_partner_address_phone" icon="gtk-convert" string="Update phone" type="object" colspan="2"/>
  42. <field name="current_mobile" colspan="6"/>
  43. <button name="update_partner_address_mobile" icon="gtk-convert" string="Update mobile" type="object" colspan="2"/>
  44. <newline />
  45. <button special="cancel" icon="gtk-cancel" string="Cancel" colspan="8" />
  46. <newline />
  47. <label string=" " /> <!-- Hack to have the full view of the Cancel button on GTK Client v50 for Windows -->
  48. </group>
  49. </group>
  50. <!-- I repeat the cancel button for layout reasons -->
  51. </form>
  52. </field>
  53. </record>
  54. <record id="action_open_calling_partner" model="ir.actions.act_window">
  55. <field name="name">Open calling partner</field>
  56. <field name="res_model">wizard.open.calling.partner</field>
  57. <field name="view_type">form</field>
  58. <field name="view_mode">form</field>
  59. <field name="target">new</field>
  60. </record>
  61. <menuitem id="menu_open_calling_partner_sales" parent="base.menu_base_partner" action="action_open_calling_partner" sequence="50" />
  62. </data>
  63. </openerp>