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.

83 lines
3.0 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. -->
  7. <openerp>
  8. <data>
  9. <!-- Inherit res.company to add tab for Asterisk servers -->
  10. <record id="view_asterisk_server_company_form" model="ir.ui.view">
  11. <field name="name">asterisk.server.company</field>
  12. <field name="model">res.company</field>
  13. <field name="inherit_id" ref="base.view_company_form" />
  14. <field name="arch" type="xml">
  15. <notebook>
  16. <page position="inside" string="IPBX">
  17. <field nolabel="1" name="asterisk_server_ids" />
  18. </page>
  19. </notebook>
  20. </field>
  21. </record>
  22. <!-- Form view for asterisk.server -->
  23. <record id="view_asterisk_server_form" model="ir.ui.view">
  24. <field name="name">asterisk.server.form</field>
  25. <field name="model">asterisk.server</field>
  26. <field name="type">form</field>
  27. <field name="arch" type="xml">
  28. <form string="Asterisk servers">
  29. <field name="company_id" select="1" invisible="not context.get('asterisk_server_main_view', False)" />
  30. <newline />
  31. <field name="name" select="1" />
  32. <field name="active" />
  33. <field name="ip_address" select="1" />
  34. <field name="port" />
  35. <field name="login" />
  36. <field name="password" password="True" />
  37. <field name="context" />
  38. <field name="extension_priority" />
  39. <field name="out_prefix" />
  40. <field name="national_prefix" />
  41. <field name="international_prefix" />
  42. <field name="country_prefix" select="1" />
  43. <field name="alert_info" />
  44. <field name="wait_time" />
  45. </form>
  46. </field>
  47. </record>
  48. <!-- Tree view for asterisk.server -->
  49. <record id="view_asterisk_server_tree" model="ir.ui.view">
  50. <field name="name">asterisk.server.tree</field>
  51. <field name="model">asterisk.server</field>
  52. <field name="type">tree</field>
  53. <field name="arch" type="xml">
  54. <tree string="Asterisk servers">
  55. <field name="company_id" invisible="not context.get('asterisk_server_main_view', False)"/>
  56. <field name="name" />
  57. <field name="ip_address" />
  58. <field name="port" />
  59. <field name="country_prefix" />
  60. </tree>
  61. </field>
  62. </record>
  63. <!-- Action for asterisk.server -->
  64. <record id="action_asterisk_server" model="ir.actions.act_window">
  65. <field name="name">Asterisk servers</field>
  66. <field name="res_model">asterisk.server</field>
  67. <field name="view_type">form</field>
  68. <field name="view_mode">tree,form</field>
  69. <field name="context">{'asterisk_server_main_view': True}</field>
  70. </record>
  71. <!-- Menu entry under Settings > Technical -->
  72. <menuitem id="menu_asterisk_servers" name="Asterisk" parent="base.menu_custom"/>
  73. <menuitem action="action_asterisk_server" id="act_menu_ast_server" parent="menu_asterisk_servers" sequence="50"/>
  74. </data>
  75. </openerp>