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.

102 lines
3.7 KiB

12 years ago
12 years ago
12 years ago
12 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Asterisk Click2dial module for OpenERP
  4. Copyright (C) 2010-2013 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. <!-- Search view for asterisk.server -->
  23. <record id="view_asterisk_server_search" model="ir.ui.view">
  24. <field name="name">asterisk.server.search</field>
  25. <field name="model">asterisk.server</field>
  26. <field name="arch" type="xml">
  27. <search string="Asterisk Server Search">
  28. <field name="name" />
  29. <field name="ip_address" />
  30. </search>
  31. </field>
  32. </record>
  33. <!-- Form view for asterisk.server -->
  34. <record id="view_asterisk_server_form" model="ir.ui.view">
  35. <field name="name">asterisk.server.form</field>
  36. <field name="model">asterisk.server</field>
  37. <field name="arch" type="xml">
  38. <form string="Asterisk Servers" version="7.0">
  39. <sheet>
  40. <div class="oe_title">
  41. <label for="name" string="Server Name" class="oe_edit_only"/>
  42. <h1>
  43. <field name="name"/>
  44. </h1>
  45. </div>
  46. <group>
  47. <field name="company_id" invisible="not context.get('asterisk_server_main_view', False)" />
  48. <field name="active" />
  49. <field name="ip_address" />
  50. <field name="port" />
  51. <field name="login" />
  52. <field name="password" password="True" />
  53. <field name="context" />
  54. <field name="extension_priority" />
  55. <field name="out_prefix" />
  56. <field name="national_prefix" />
  57. <field name="international_prefix" />
  58. <field name="country_prefix" />
  59. <field name="alert_info" />
  60. <field name="wait_time" />
  61. <field name="number_of_digits_to_match_from_end" />
  62. </group>
  63. </sheet>
  64. </form>
  65. </field>
  66. </record>
  67. <!-- Tree view for asterisk.server -->
  68. <record id="view_asterisk_server_tree" model="ir.ui.view">
  69. <field name="name">asterisk.server.tree</field>
  70. <field name="model">asterisk.server</field>
  71. <field name="arch" type="xml">
  72. <tree string="Asterisk servers">
  73. <field name="company_id" invisible="not context.get('asterisk_server_main_view', False)"/>
  74. <field name="name" />
  75. <field name="ip_address" />
  76. <field name="port" />
  77. <field name="country_prefix" />
  78. </tree>
  79. </field>
  80. </record>
  81. <!-- Action for asterisk.server -->
  82. <record id="action_asterisk_server" model="ir.actions.act_window">
  83. <field name="name">Asterisk servers</field>
  84. <field name="res_model">asterisk.server</field>
  85. <field name="view_type">form</field>
  86. <field name="view_mode">tree,form</field>
  87. <field name="context">{'asterisk_server_main_view': True}</field>
  88. </record>
  89. <!-- Menu entry under Settings > Technical -->
  90. <menuitem id="menu_asterisk_servers" name="Asterisk" parent="base.menu_custom"/>
  91. <menuitem action="action_asterisk_server" id="act_menu_ast_server" parent="menu_asterisk_servers" sequence="50"/>
  92. </data>
  93. </openerp>