[FIX] crm: Put action_cancel method for closing wizard of schedule call to opportunity
[odoo/odoo.git] / addons / crm / wizard / crm_phonecall_to_phonecall_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4     
5     <!-- Phonecall to Phonecall view -->
6     
7         <record model="ir.ui.view" id="phonecall_to_phonecall_view">
8             <field name="name">crm.phonecall2phonecall.form</field>
9             <field name="model">crm.phonecall2phonecall</field>
10             <field name="type">form</field>
11             <field name="arch" type="xml">
12                 <form string="Schedule/Log a call">
13                         <separator string="Schedule/Log a call" colspan="4"/>
14                         <field name="action"/>
15                         <separator string="Call Details" colspan="4"/>
16                         <field name="name"/>
17                         <field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
18                         <field name="partner_id" readonly="True"/>
19                         <field name="user_id" />
20                         <field name="section_id"/>
21                         <field name="categ_id" string="Type" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
22                         <separator string=" " colspan="4"/>
23                         <group colspan="4" col="3" >
24                             <button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
25                             <button name="action_schedule" type="object" string="Log call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'log')]}" />
26                             <button name="action_schedule" type="object" string="Schedule call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'schedule')]}" />
27                         </group>
28                 </form>
29             </field>
30         </record>
31
32 <!-- Phonecall to Phonecall action -->
33
34         <record model="ir.actions.act_window" id="phonecall_to_phonecall_act">
35             <field name="name">Schedule Other Call</field>
36             <field name="res_model">crm.phonecall2phonecall</field>
37             <field name="view_type">form</field>
38             <field name="view_mode">form</field>
39             <field name="view_id" ref="phonecall_to_phonecall_view"/>
40             <field name="target">new</field>
41         </record>
42
43     </data>
44 </openerp>