<?xml version="1.0"?>
<openerp>
    <data>
    
    <!-- Phonecall to Phonecall view -->
    
        <record model="ir.ui.view" id="phonecall_to_phonecall_view">
            <field name="name">crm.phonecall2phonecall.form</field>
            <field name="model">crm.phonecall2phonecall</field>
            <field name="arch" type="xml">
                <form string="Schedule/Log a Call">
                    <group col="4">
                        <field name="action"/>
                        <field name="name"/>
                        <field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
                        <field name="partner_id" readonly="True"/>
                        <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
                        <field name="section_id" groups="base.group_multi_salesteams"/>
                    </group>
                    <footer>
                        <button name="action_schedule" type="object" string="Log Call" attrs="{'invisible' : [('action', '!=', 'log')]}" class="oe_highlight"/>
                        <button name="action_schedule" type="object" string="Schedule Call" attrs="{'invisible' : [('action', '!=', 'schedule')]}" class="oe_highlight"/>
                        or
                        <button string="Cancel" class="oe_link" special="cancel" />
                    </footer>
                </form>
            </field>
        </record>

<!-- Phonecall to Phonecall action -->

        <record model="ir.actions.act_window" id="phonecall_to_phonecall_act">
            <field name="name">Schedule Other Call</field>
            <field name="res_model">crm.phonecall2phonecall</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="phonecall_to_phonecall_view"/>
            <field name="target">new</field>
        </record>

    </data>
</openerp>   
