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.
|
|
<?xml version="1.0" encoding="utf-8"?> <!--
Asterisk Click2dial module for OpenERP Copyright (C) 2012 Alexis de Lattre <alexis@via.ecp.fr> The licence is in the file __openerp__.py -->
<openerp> <data>
<!-- 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" colspan="4"/> <field name="partner_address_id" attrs="{'invisible':[('partner_address_id','=',False)]}"/> <field name="partner_id" attrs="{'invisible':[('partner_address_id','=',False)]}" /> <!-- I want it visible when partner_address_id != False and partner_id = False, so that the user can see that this partner_address doesn't have a partner --> <newline /> <group colspan="4" attrs="{'invisible':[('partner_id','=',False)]}"> <button name="open_partner" icon="gtk-go-forward" string="Partner form" type="object" /> <button name="open_sale_orders" icon="gtk-go-forward" string="Related sale orders" type="object" /> <button name="open_invoices" icon="gtk-go-forward" string="Related invoices" type="object" /> <button special="cancel" icon="gtk-cancel" string="Cancel" /> </group> <!-- I display the button "Contact form" when the partner address exists but not the partner --> <group colspan="4" attrs="{'invisible':['|', '&', ('partner_address_id','!=',False), ('partner_id','!=',False), ('partner_address_id','=',False)]}"> <button name="open_partner_address" icon="gtk-go-forward" string="Contact form" type="object" colspan="2"/> <button special="cancel" icon="gtk-cancel" string="Cancel" colspan="2"/> </group>
<group attrs="{'invisible':[('partner_address_id','!=',False)]}" colspan="4" col="8"> <label string="No partner contact found in OpenERP with this number" colspan="8" /> <separator string="Create a new contact" colspan="8" /> <button name="create_partner_address_phone" icon="gtk-new" string="with calling number as phone" type="object" colspan="4"/> <button name="create_partner_address_mobile" icon="gtk-new" string="with calling number as mobile" type="object" colspan="4"/> <newline />
<separator string="Update an existing contact" colspan="8" /> <field name="to_update_partner_address_id" colspan="8" on_change="onchange_to_update_partner_address(to_update_partner_address_id)"/> <field name="current_phone" colspan="6"/> <button name="update_partner_address_phone" icon="gtk-convert" string="Update phone" type="object" colspan="2"/> <field name="current_mobile" colspan="6"/> <button name="update_partner_address_mobile" icon="gtk-convert" string="Update mobile" type="object" colspan="2"/> <newline />
<button special="cancel" icon="gtk-cancel" string="Cancel" colspan="8" /> </group> <!-- 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>
|