|
|
<?xml version="1.0" encoding="utf-8"?> <!--
Asterisk Click2dial module for OpenERP Copyright (C) 2010-2013 Alexis de Lattre <alexis@via.ecp.fr> The licence is in the file __openerp__.py
Inherit partner views to add 'Dial' button next to 'phone' and 'mobile' fields -->
<openerp> <data>
<record id="asterisk_res_partner_simplified_form_dial" model="ir.ui.view"> <field name="name">asterisk.res.partner.simplified.form.dial</field> <field name="model">res.partner</field> <field name="priority">15</field> <field name="inherit_id" ref="base.view_partner_simple_form"/> <field name="arch" type="xml"> <field name="phone" position="replace"> <group colspan="2" col="8"> <field name="phone" widget="phone" colspan="7" /> <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/> </group> </field> <field name="mobile" position="replace"> <group colspan="2" col="8"> <field name="mobile" widget="phone" colspan="7" /> <button name="action_dial" context="{'field2dial': 'mobile'}" string="Dial" type="object" attrs="{'invisible':[('mobile','=',False)]}"/> </group> </field> </field> </record>
<record id="asterisk_res_partner_form_dial" model="ir.ui.view"> <field name="name">asterisk.res.partner.form.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"> <xpath expr="//group/group/field[@name='phone']" position="replace"> <group colspan="2" col="8"> <field name="phone" widget="phone" colspan="7" /> <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/> </group> </xpath> <xpath expr="//group/group/field[@name='mobile']" position="replace"> <group colspan="2" col="8"> <field name="mobile" widget="phone" colspan="7" /> <button name="action_dial" context="{'field2dial': 'mobile'}" string="Dial" type="object" attrs="{'invisible':[('mobile','=',False)]}"/> </group> </xpath> <xpath expr="//form[@string='Contact']/sheet/group/field[@name='phone']" position="replace"> <group colspan="2" col="8"> <field name="phone" widget="phone" colspan="7" /> <button name="action_dial" context="{'field2dial': 'phone'}" string="Dial" type="object" attrs="{'invisible':[('phone','=',False)]}"/> </group> </xpath> <xpath expr="//form[@string='Contact']/sheet/group/field[@name='mobile']" position="replace"> <group colspan="2" col="8"> <field name="mobile" widget="phone" colspan="7" /> <button name="action_dial" context="{'field2dial': 'mobile'}" string="Dial" type="object" attrs="{'invisible':[('mobile','=',False)]}"/> </group> </xpath> </field> </record>
</data> </openerp>
|