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.
121 lines
5.1 KiB
121 lines
5.1 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Asterisk Click2dial module for OpenERP
|
|
Copyright (C) 2010-2012 Alexis de Lattre <alexis@via.ecp.fr>
|
|
The licence is in the file __openerp__.py
|
|
|
|
Inherit partner_address views to add 'Dial' button next to 'phone'
|
|
and 'mobile' fields
|
|
-->
|
|
|
|
<openerp>
|
|
<data>
|
|
|
|
<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="priority">15</field>
|
|
<field name="inherit_id" ref="base.view_partner_address_form1"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<field name="phone" position="replace">
|
|
<group colspan="2" col="8">
|
|
<field name="phone" colspan="7" />
|
|
<button name="action_dial_phone" string="Dial" type="object"/>
|
|
</group>
|
|
</field>
|
|
<field name="mobile" position="replace">
|
|
<group colspan="2" col="8">
|
|
<field name="mobile" colspan="7" />
|
|
<button name="action_dial_mobile" string="Dial" type="object"/>
|
|
</group>
|
|
</field>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
<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="priority">15</field>
|
|
<field name="inherit_id" ref="base.view_partner_address_form2"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<field name="phone" position="replace">
|
|
<group colspan="2" col="8">
|
|
<field name="phone" colspan="7" />
|
|
<button name="action_dial_phone" string="Dial" type="object"/>
|
|
</group>
|
|
</field>
|
|
<field name="mobile" position="replace">
|
|
<group colspan="2" col="8">
|
|
<field name="mobile" colspan="7" />
|
|
<button name="action_dial_mobile" string="Dial" type="object"/>
|
|
</group>
|
|
</field>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
<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="priority">15</field>
|
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
|
<field name="arch" type="xml">
|
|
<data>
|
|
<field name="phone" position="replace">
|
|
<group colspan="2" col="8">
|
|
<field name="phone" colspan="7" />
|
|
<button name="action_dial_phone" string="Dial" type="object"/>
|
|
</group>
|
|
</field>
|
|
<field name="mobile" position="replace">
|
|
<group colspan="2" col="8">
|
|
<field name="mobile" colspan="7" />
|
|
<button name="action_dial_mobile" string="Dial" type="object"/>
|
|
</group>
|
|
</field>
|
|
</data>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Get partner from incoming phone call -->
|
|
|
|
<record id="view_open_calling_partner" model="ir.ui.view">
|
|
<field name="name">view_open_calling_partner</field>
|
|
<field name="model">wizard.open.calling.partner</field>
|
|
<field name="type">form</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Open calling partner">
|
|
<field name="calling_number" readonly="1"/>
|
|
<field name="partner_address_id" readonly="1" />
|
|
<field name="partner_id" readonly="1" />
|
|
<newline />
|
|
<button name="open_partner" icon="gtk-go-forward" string="Partner form" type="object" attrs="{'invisible':[('partner_id','=',False)]}"/>
|
|
<button name="open_sale_orders" icon="gtk-go-forward" string="Related sale orders" type="object" attrs="{'invisible':[('partner_id','=',False)]}" />
|
|
<button name="open_invoices" icon="gtk-go-forward" string="Related invoices" type="object" attrs="{'invisible':[('partner_id','=',False)]}" />
|
|
<button special="cancel" icon="gtk-cancel" string="Cancel" attrs="{'invisible':[('partner_id','=',False)]}" />
|
|
<newline />
|
|
<button name="create_new_partner_phone" icon="gtk-new" string="Create new partner with this phone number" type="object" attrs="{'invisible':[('partner_id','!=',False)]}" colspan="2"/>
|
|
<button name="create_new_partner_mobile" icon="gtk-new" string="Create new partner with this mobile number" type="object" attrs="{'invisible':[('partner_id','!=',False)]}" colspan="2"/>
|
|
<newline />
|
|
<button special="cancel" icon="gtk-cancel" string="Cancel" attrs="{'invisible':[('partner_id','!=',False)]}" colspan="4" />
|
|
<!-- I repeat the cancel button for layout reasons -->
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
|
|
<record id="action_open_calling_partner" model="ir.actions.act_window">
|
|
<field name="name">Open calling partner</field>
|
|
<field name="res_model">wizard.open.calling.partner</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">new</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_open_calling_partner_sales" parent="base.menu_address_book" action="action_open_calling_partner" sequence="50" />
|
|
|
|
</data>
|
|
</openerp>
|