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.

67 lines
3.3 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. <field name="calling_number" colspan="4"/>
  17. <group attrs="{'invisible':[('partner_id','=',False)]}" colspan="4">
  18. <field name="partner_address_id" />
  19. <field name="partner_id" />
  20. </group>
  21. <newline />
  22. <group colspan="4" attrs="{'invisible':[('partner_id','=',False)]}">
  23. <button name="open_partner" icon="gtk-go-forward" string="Partner form" type="object" />
  24. <button name="open_sale_orders" icon="gtk-go-forward" string="Related sale orders" type="object" />
  25. <button name="open_invoices" icon="gtk-go-forward" string="Related invoices" type="object" />
  26. <button special="cancel" icon="gtk-cancel" string="Cancel" />
  27. <newline />
  28. <!-- TODO : try to reimplement the scenario where the partner_address exist but not the partner ; cf the 6.1 branch -->
  29. </group>
  30. <group attrs="{'invisible':[('partner_address_id','!=',False)]}" colspan="4" col="8">
  31. <label string="No partner contact found in OpenERP with this number" colspan="8" />
  32. <separator string="Create a new contact" colspan="8" />
  33. <button name="create_partner_address_phone" icon="gtk-new" string="with calling number as phone" type="object" colspan="4"/>
  34. <button name="create_partner_address_mobile" icon="gtk-new" string="with calling number as mobile" type="object" colspan="4"/>
  35. <newline />
  36. <separator string="Update an existing contact" colspan="8" />
  37. <field name="to_update_partner_address_id" colspan="8" on_change="onchange_to_update_partner_address(to_update_partner_address_id)"/>
  38. <field name="current_phone" colspan="6"/>
  39. <button name="update_partner_address_phone" icon="gtk-convert" string="Update phone" type="object" colspan="2"/>
  40. <field name="current_mobile" colspan="6"/>
  41. <button name="update_partner_address_mobile" icon="gtk-convert" string="Update mobile" type="object" colspan="2"/>
  42. <newline />
  43. <button special="cancel" icon="gtk-cancel" string="Cancel" colspan="8" />
  44. </group>
  45. <!-- I repeat the cancel button for layout reasons -->
  46. </form>
  47. </field>
  48. </record>
  49. <record id="action_open_calling_partner" model="ir.actions.act_window">
  50. <field name="name">Open calling partner</field>
  51. <field name="res_model">wizard.open.calling.partner</field>
  52. <field name="view_type">form</field>
  53. <field name="view_mode">form</field>
  54. <field name="target">new</field>
  55. </record>
  56. <menuitem id="menu_open_calling_partner_sales" parent="base.menu_base_partner" action="action_open_calling_partner" sequence="50" />
  57. </data>
  58. </openerp>