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.

81 lines
2.9 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="arch" type="xml">
  27. <form string="Asterisk servers">
  28. <field name="company_id" select="1" invisible="not context.get('asterisk_server_main_view', False)" />
  29. <newline />
  30. <field name="name" select="1" />
  31. <field name="active" />
  32. <field name="ip_address" select="1" />
  33. <field name="port" />
  34. <field name="login" />
  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="alert_info" />
  43. <field name="wait_time" />
  44. </form>
  45. </field>
  46. </record>
  47. <!-- Tree view for asterisk.server -->
  48. <record id="view_asterisk_server_tree" model="ir.ui.view">
  49. <field name="name">asterisk.server.tree</field>
  50. <field name="model">asterisk.server</field>
  51. <field name="arch" type="xml">
  52. <tree string="Asterisk servers">
  53. <field name="company_id" invisible="not context.get('asterisk_server_main_view', False)"/>
  54. <field name="name" />
  55. <field name="ip_address" />
  56. <field name="port" />
  57. <field name="country_prefix" />
  58. </tree>
  59. </field>
  60. </record>
  61. <!-- Action for asterisk.server -->
  62. <record id="action_asterisk_server" model="ir.actions.act_window">
  63. <field name="name">Asterisk servers</field>
  64. <field name="res_model">asterisk.server</field>
  65. <field name="view_type">form</field>
  66. <field name="view_mode">tree,form</field>
  67. <field name="context">{'asterisk_server_main_view': True}</field>
  68. </record>
  69. <!-- Menu entry under Settings > Technical -->
  70. <menuitem id="menu_asterisk_servers" name="Asterisk" parent="base.menu_custom"/>
  71. <menuitem action="action_asterisk_server" id="act_menu_ast_server" parent="menu_asterisk_servers" sequence="50"/>
  72. </data>
  73. </openerp>