5 <!-- Opportunity to Phonecall view -->
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"/>
17 <field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
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"/>
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')]}" />
37 <!-- Opportunity to Phonecall action -->
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>