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

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Asterisk Click2dial module for OpenERP
  4. Copyright (C) 2010-2011 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. <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" select="2" />
  33. <field name="ip_address" select="1" />
  34. <field name="port" select="2" />
  35. <field name="login" select="2" />
  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="national_format_allowed" />
  44. <field name="alert_info" />
  45. <field name="wait_time" />
  46. </form>
  47. </field>
  48. </record>
  49. <!-- Tree view for asterisk.server -->
  50. <record id="view_asterisk_server_tree" model="ir.ui.view">
  51. <field name="name">asterisk.server.tree</field>
  52. <field name="model">asterisk.server</field>
  53. <field name="type">tree</field>
  54. <field name="arch" type="xml">
  55. <tree string="Asterisk servers">
  56. <field name="company_id" invisible="not context.get('asterisk_server_main_view', False)"/>
  57. <field name="name" />
  58. <field name="ip_address" />
  59. <field name="port" />
  60. <field name="country_prefix" />
  61. </tree>
  62. </field>
  63. </record>
  64. <!-- Action for asterisk.server -->
  65. <record id="action_asterisk_server" model="ir.actions.act_window">
  66. <field name="name">Asterisk servers</field>
  67. <field name="res_model">asterisk.server</field>
  68. <field name="view_type">form</field>
  69. <field name="view_mode">tree,form</field>
  70. <field name="context">{'asterisk_server_main_view': True}</field>
  71. </record>
  72. <!-- Menu entry under Administration > Configuration -->
  73. <menuitem action="action_asterisk_server" id="act_menu_ast_server" parent="base.menu_config" />
  74. </data>
  75. </openerp>