Browse Source

Changed author name to Akretion

Changed view names
Great solution (thanks to Sebastien for finding it !) to avoid having 2 different tree&form views for asterisk server.
6.0
Alexis de Lattre 14 years ago
parent
commit
5ab7197afe
  1. 2
      asterisk_click2dial/__terp__.py
  2. 63
      asterisk_click2dial/asterisk_server_view.xml
  3. 12
      asterisk_click2dial/res_partner_view.xml
  4. 4
      asterisk_click2dial/res_users_view.xml

2
asterisk_click2dial/__terp__.py

@ -47,7 +47,7 @@ Here is how it works :
of the user.
A detailed documentation for this module is available on the Akretion Web site : http://www.akretion.com/en/products-and-services/openerp-asterisk-voip-connector """,
'author': 'Alexis de Lattre',
'author': 'Akretion',
'website': 'http://www.akretion.com/',
'depends': ['base'],
'init_xml': [],

63
asterisk_click2dial/asterisk_server_view.xml

@ -16,20 +16,21 @@
<field name="arch" type="xml">
<notebook>
<page position="inside" string="IPBX">
<separator colspan="4" string="Asterisk servers for click2dial" />
<field nolabel="1" name="asterisk_server_ids" />
</page>
</notebook>
</field>
</record>
<!-- Form view for asterisk.server inside Company view -->
<!-- Form view for asterisk.server -->
<record id="view_asterisk_server_form" model="ir.ui.view">
<field name="name">asterisk.server.form</field>
<field name="model">asterisk.server</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Asterisk servers">
<field name="company_id" select="1" invisible="not context.get('asterisk_server_main_view', False)" />
<newline />
<field name="name" select="1" />
<field name="active" select="2" />
<field name="ip_address" select="1" />
@ -49,13 +50,14 @@
</field>
</record>
<!-- Tree view for asterisk.server inside company view -->
<!-- Tree view for asterisk.server -->
<record id="view_asterisk_server_tree" model="ir.ui.view">
<field name="name">asterisk.server.tree</field>
<field name="model">asterisk.server</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Asterisk servers">
<field name="company_id" invisible="not context.get('asterisk_server_main_view', False)"/>
<field name="name" />
<field name="ip_address" />
<field name="port" />
@ -64,66 +66,17 @@
</field>
</record>
<!-- Action for asterisk.server inside company view -->
<!-- Action for asterisk.server -->
<record id="action_asterisk_server" model="ir.actions.act_window">
<field name="name">Asterisk servers</field>
<field name="res_model">asterisk.server</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- Form view for asterisk.server - standalone -->
<record id="view_asterisk_server_standalone_form" model="ir.ui.view">
<field name="name">asterisk.server.standalone.form</field>
<field name="model">asterisk.server</field>
<field name="inherit_id" ref="view_asterisk_server_form" />
<field name="type">form</field>
<field name="arch" type="xml">
<field name="name" position="before">
<field name="company_id" select="1" />
<newline />
</field>
</field>
</record>
<!-- Tree view for asterisk.server - standalone -->
<record id="view_asterisk_server_standalone_tree" model="ir.ui.view">
<field name="name">asterisk.server.standalone.tree</field>
<field name="model">asterisk.server</field>
<field name="inherit_id" ref="view_asterisk_server_tree" />
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="name" position="before">
<field name="company_id" />
</field>
</field>
</record>
<!-- Action for asterisk.server - standalone -->
<record id="action_asterisk_server_standalone" model="ir.actions.act_window">
<field name="name">Asterisk servers</field>
<field name="res_model">asterisk.server</field>
<field name="view_type">form</field>
</record>
<!-- Action view "tree" for asterisk.server - standalone -->
<record id="action_asterisk_server_standalone_tree" model="ir.actions.act_window.view">
<field eval="10" name="sequence"/> <!-- open tree view first -->
<field name="view_mode">tree</field>
<field name="view_id" ref="view_asterisk_server_standalone_tree" />
<field name="act_window_id" ref="action_asterisk_server_standalone" />
</record>
<!-- Action view "form" for asterisk.server - standalone -->
<record id="action_asterisk_server_standalone_form" model="ir.actions.act_window.view">
<field eval="20" name="sequence"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_asterisk_server_standalone_form" />
<field name="act_window_id" ref="action_asterisk_server_standalone" />
<field name="context">{'asterisk_server_main_view': True}</field>
</record>
<!-- Menu entry under Administration > Configuration -->
<menuitem action="action_asterisk_server_standalone" id="act_menu_ast_server" parent="base.menu_config" />
<menuitem action="action_asterisk_server" id="act_menu_ast_server" parent="base.menu_config" />
</data>

12
asterisk_click2dial/res_partner_view.xml

@ -11,8 +11,8 @@
<openerp>
<data>
<record id="view_res_partner_address_inherit_form1" model="ir.ui.view">
<field name="name">res.partner.address.inherit.form1</field>
<record id="asterisk_res_partner_address_dial1" model="ir.ui.view">
<field name="name">asterisk.res.partner.address.dial1</field>
<field name="model">res.partner.address</field>
<field name="type">form</field>
<field name="priority">15</field>
@ -37,8 +37,8 @@
</field>
</record>
<record id="view_res_partner_address_inherit_form2" model="ir.ui.view">
<field name="name">res.partner.address.inherit.form2</field>
<record id="asterisk_res_partner_address_dial2" model="ir.ui.view">
<field name="name">asterisk.res.partner.address.dial2</field>
<field name="model">res.partner.address</field>
<field name="type">form</field>
<field name="priority">15</field>
@ -63,8 +63,8 @@
</field>
</record>
<record id="view_res_partner_inherit_form" model="ir.ui.view">
<field name="name">res.partner.inherit.form</field>
<record id="asterisk_res_partner_dial" model="ir.ui.view">
<field name="name">asterisk.res.partner.dial</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="priority">15</field>

4
asterisk_click2dial/res_users_view.xml

@ -10,8 +10,8 @@
<openerp>
<data>
<record id="view_res_users_inherit_internal_number" model="ir.ui.view">
<field name="name">res.users.inherit.internal.number</field>
<record id="asterisk_res_users_internal_number" model="ir.ui.view">
<field name="name">asterisk.res.users.internal.number</field>
<field name="model">res.users</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_users_form"/>

Loading…
Cancel
Save