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.

147 lines
5.6 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Asterisk Click2dial module for OpenERP
  4. Copyright (C) 2010 Alexis de Lattre <alexis@via.ecp.fr>
  5. The licence is in the file __terp__.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. <separator colspan="4" string="Asterisk servers for click2dial" />
  18. <field nolabel="1" name="asterisk_server_ids" />
  19. </page>
  20. </notebook>
  21. </field>
  22. </record>
  23. <!-- Form view for asterisk.server inside Company view -->
  24. <record id="view_asterisk_server_form" model="ir.ui.view">
  25. <field name="name">asterisk.server.form</field>
  26. <field name="model">asterisk.server</field>
  27. <field name="type">form</field>
  28. <field name="arch" type="xml">
  29. <form string="Asterisk servers">
  30. <field name="name" select="1" />
  31. <field name="active" select="2" />
  32. <field name="ip_address" select="1" />
  33. <field name="port" select="2" />
  34. <field name="login" select="2" />
  35. <field name="password" password="True" />
  36. <field name="context" />
  37. <field name="extension_priority" />
  38. <field name="out_prefix" />
  39. <field name="national_prefix" />
  40. <field name="international_prefix" />
  41. <field name="country_prefix" select="1" />
  42. <field name="national_format_allowed" />
  43. <field name="alert_info" />
  44. <field name="wait_time" />
  45. </form>
  46. </field>
  47. </record>
  48. <!-- Tree view for asterisk.server inside company view -->
  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="name" />
  56. <field name="ip_address" />
  57. <field name="port" />
  58. <field name="country_prefix" />
  59. </tree>
  60. </field>
  61. </record>
  62. <!-- Action for asterisk.server inside company view -->
  63. <record id="action_asterisk_server" model="ir.actions.act_window">
  64. <field name="name">Asterisk servers</field>
  65. <field name="res_model">asterisk.server</field>
  66. <field name="view_type">form</field>
  67. <field name="view_mode">tree,form</field>
  68. </record>
  69. <!-- Form view for asterisk.server - standalone -->
  70. <record id="view_asterisk_server_standalone_form" model="ir.ui.view">
  71. <field name="name">asterisk.server.standalone.form</field>
  72. <field name="model">asterisk.server</field>
  73. <field name="type">form</field>
  74. <field name="arch" type="xml">
  75. <form string="Asterisk servers">
  76. <field name="company_id" select="1" />
  77. <newline />
  78. <field name="name" select="1" />
  79. <field name="active" select="2" />
  80. <field name="ip_address" select="1" />
  81. <field name="port" select="2" />
  82. <field name="login" select="2" />
  83. <field name="password" password="True" />
  84. <field name="context" />
  85. <field name="extension_priority" />
  86. <field name="out_prefix" />
  87. <field name="national_prefix" />
  88. <field name="international_prefix" />
  89. <field name="country_prefix" select="1" />
  90. <field name="national_format_allowed" />
  91. <field name="alert_info" />
  92. <field name="wait_time" />
  93. </form>
  94. </field>
  95. </record>
  96. <!-- Tree view for asterisk.server - standalone -->
  97. <record id="view_asterisk_server_standalone_tree" model="ir.ui.view">
  98. <field name="name">asterisk.server.standalone.tree</field>
  99. <field name="model">asterisk.server</field>
  100. <field name="type">tree</field>
  101. <field name="arch" type="xml">
  102. <tree string="Asterisk servers">
  103. <field name="company_id" />
  104. <field name="name" />
  105. <field name="ip_address" />
  106. <field name="port" />
  107. <field name="country_prefix" />
  108. </tree>
  109. </field>
  110. </record>
  111. <!-- Action for asterisk.server - standalone -->
  112. <record id="action_asterisk_server_standalone" model="ir.actions.act_window">
  113. <field name="name">Asterisk servers</field>
  114. <field name="res_model">asterisk.server</field>
  115. <field name="view_type">form</field>
  116. </record>
  117. <!-- Action view "tree" for asterisk.server - standalone -->
  118. <record id="action_asterisk_server_standalone_tree" model="ir.actions.act_window.view">
  119. <field eval="10" name="sequence"/> <!-- open tree view first -->
  120. <field name="view_mode">tree</field>
  121. <field name="view_id" ref="view_asterisk_server_standalone_tree" />
  122. <field name="act_window_id" ref="action_asterisk_server_standalone" />
  123. </record>
  124. <!-- Action view "form" for asterisk.server - standalone -->
  125. <record id="action_asterisk_server_standalone_form" model="ir.actions.act_window.view">
  126. <field eval="20" name="sequence"/>
  127. <field name="view_mode">form</field>
  128. <field name="view_id" ref="view_asterisk_server_standalone_form" />
  129. <field name="act_window_id" ref="action_asterisk_server_standalone" />
  130. </record>
  131. <!-- Menu entry under Administration > Configuration -->
  132. <menuitem action="action_asterisk_server_standalone" id="act_menu_ast_server" parent="base.menu_config" />
  133. </data>
  134. </openerp>