[MERGE] crm: fixed bug 907316: undefined context in opportunity creation wizard
[odoo/odoo.git] / addons / crm / wizard / crm_opportunity_to_phonecall_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4
5         <!-- Opportunity to Phonecall view -->
6
7         <record model="ir.ui.view" id="opportunity2phonecall_view">
8             <field name="name">crm.opportunity2phonecall.form</field>
9             <field name="model">crm.opportunity2phonecall</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                     <newline/>
19                     <field name="partner_id" readonly="True"/>
20                     <field name="categ_id" string="Type" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
21                     <field name="contact_name"/>
22                     <field name="phone"/>
23                     <field name="user_id" attrs="{'invisible': [('action','=','log')]}"/>                    
24                     <field name="section_id" widget="selection" attrs="{'invisible': [('action','=','log')]}"/>
25                     <separator string="Notes" colspan="4"/>
26                     <field name="note" colspan="4" nolabel="1"/>
27                     <separator string="" colspan="4"/>
28                     <group colspan="4" col="3">
29                         <button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
30                         <button name="action_schedule" type="object" string="Log call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'log')]}" />
31                         <button name="action_schedule" type="object" string="Schedule call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'schedule')]}" />
32                     </group>
33                 </form>
34             </field>
35         </record>
36
37                 <!-- Opportunity to Phonecall action -->
38
39                 <record model="ir.actions.act_window" id="opportunity2phonecall_act">
40             <field name="name">Schedule/Log Call</field>
41             <field name="res_model">crm.opportunity2phonecall</field>
42             <field name="view_type">form</field>
43             <field name="view_mode">form</field>
44             <field name="view_id" ref="opportunity2phonecall_view"/>
45             <field name="target">new</field>
46         </record>
47
48     </data>
49 </openerp>