5 <!-- Phonecall Categories Form View -->
7 <record id="crm_phonecall_categ_action" model="ir.actions.act_window">
8 <field name="name">Phonecall Categories</field>
9 <field name="res_model">crm.case.categ</field>
10 <field name="view_type">form</field>
11 <field name="view_id" ref="crm.crm_case_categ_tree-view"/>
12 <field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
13 <field name="context">{'object_id':'crm.phonecall'}</field>
16 <menuitem action="crm_phonecall_categ_action"
17 id="menu_crm_case_phonecall-act" parent="crm.menu_crm_case_categ" />
19 <!-- ResourceType Form View -->
21 <record id="crm_phonecall_resource_act" model="ir.actions.act_window">
22 <field name="name">Phonecall Resource Type</field>
23 <field name="res_model">crm.case.resource.type</field>
24 <field name="view_type">form</field>
25 <field name="view_id" ref="crm.crm_case_resource_type_tree"/>
26 <field name="domain">[('object_id.model', '=', 'crm.phonecall')]</field>
27 <field name="context">{'object_id':'crm.phonecall'}</field>
30 <menuitem action="crm_phonecall_resource_act"
31 id="menu_crm_phonecall_resource_act"
32 parent="crm.menu_crm_case_resource_type" />
35 <!-- PhoneCalls Tree View -->
37 <record model="ir.ui.view" id="crm_case_phone_tree_view">
38 <field name="name">CRM - Phone Calls Tree</field>
39 <field name="model">crm.phonecall</field>
40 <field name="type">tree</field>
41 <field name="arch" type="xml">
43 <tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
44 <field name="date" string="Date"/>
45 <field name="name" string="Call Summary"/>
46 <field name="partner_id" string="Partner"/>
47 <field name="partner_contact"/>
48 <field name="partner_phone"/>
49 <field name="user_id"/>
50 <button string="Opportunity"
51 name="%(phonecall2opportunity_act)d"
52 states="draft,open,pending"
53 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
54 <button string="Meeting"
55 states="draft,open,pending"
56 name="action_make_meeting" type="object" />
58 <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
59 <button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
60 <button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
61 <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
66 <!-- Phonecalls Form View -->
68 <record model="ir.ui.view" id="crm_case_phone_form_view">
69 <field name="name">CRM - Phone Call Form</field>
70 <field name="model">crm.phonecall</field>
71 <field name="type">form</field>
72 <field name="arch" type="xml">
73 <form string="Phone Call">
74 <group colspan="4" col="7">
75 <field name="name" string="Summary"/>
76 <field name="date" string="Planned Date"/>
77 <field name="user_id"/>
78 <button string="Schedule a Meeting"
79 name="action_make_meeting"
83 <field name="partner_phone"/>
84 <field name="duration"/>
85 <field name="section_id" colspan="1" widget="selection" />
86 <button string="Convert to Opportunity"
87 name="%(phonecall2opportunity_act)d"
88 icon="gtk-index" type="action"
89 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
90 <label colspan="6" string=""/>
91 <button string="Schedule Other Call"
93 name="%(phonecall_to_phonecall_act)d"
97 <group col="3" colspan="2">
98 <separator colspan="3" string="Contacts" />
99 <field name="partner_id"
100 on_change="onchange_partner_id(partner_id, email_from)" />
101 <button string="Create a Partner"
103 name="%(action_crm_phonecall2partner)d"
105 attrs="{'invisible':[('partner_id','!=',False)]}" />
107 <field name="partner_address_id" string="Contact"
108 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
110 <field name="partner_mobile" />
112 <group col="2" colspan="2">
113 <separator colspan="2" string="Categorization" />
114 <field name="priority"/>
115 <field name="opportunity_id"/>
117 <separator string="Description" colspan="4" />
118 <field name="description" nolabel="1" colspan="4" />
119 <separator colspan="4" />
120 <group col="8" colspan="4">
121 <field name="state" select="1" />
122 <button name="case_cancel" string="Cancel"
123 states="draft,open,pending" type="object"
125 <button name="case_open" string="Open"
126 states="draft,pending" type="object"
127 icon="gtk-go-forward" />
128 <button name="case_pending" string="Not Held"
129 states="open" type="object" icon="gtk-undo" />
130 <button name="case_close" string="Held"
131 states="open,draft,pending" type="object"
132 icon="gtk-jump-to" />
133 <button name="case_reset" string="Reset to Draft"
134 states="done,cancel" type="object"
135 icon="gtk-convert" />
141 <!--Inbound Phonecalls Form View -->
143 <record model="ir.ui.view" id="crm_case_inbound_phone_form_view">
144 <field name="name">CRM - Inbound Phone Call Form</field>
145 <field name="model">crm.phonecall</field>
146 <field name="type">form</field>
147 <field name="arch" type="xml">
148 <form string="Phone Call">
149 <group colspan="4" col="7">
150 <field name="name" string="Summary"/>
151 <field name="date" string="Planned Date"/>
152 <field name="user_id"/>
153 <button string="Schedule a Meeting"
154 name="action_make_meeting"
158 <field name="partner_phone"/>
159 <field name="duration"/>
160 <field name="section_id" colspan="1" widget="selection" />
161 <button string="Convert to Opportunity"
162 name="%(phonecall2opportunity_act)d"
163 icon="gtk-index" type="action"
164 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
165 <label colspan="6" string=""/>
166 <button string="Schedule Other Call"
168 name="%(phonecall_to_phonecall_act)d"
172 <group col="3" colspan="2">
173 <separator colspan="3" string="Contacts" />
174 <field name="partner_id"
175 on_change="onchange_partner_id(partner_id, email_from)" />
176 <button string="Create a Partner"
178 name="%(action_crm_phonecall2partner)d"
180 attrs="{'invisible':[('partner_id','!=',False)]}" />
182 <field name="partner_address_id" string="Contact"
183 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
185 <field name="partner_phone" />
187 <field name="partner_mobile" />
189 <group col="2" colspan="2">
190 <separator colspan="2" string="Categorization" />
191 <field name="priority"/>
192 <field name="opportunity_id"/>
194 <separator string="Description" colspan="4" />
195 <field name="description" nolabel="1" colspan="4" />
196 <separator colspan="4" />
201 <!--Inbound Phonecalls Tree View -->
203 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
204 <field name="name">CRM - Inbound Phone Calls Tree</field>
205 <field name="model">crm.phonecall</field>
206 <field name="type">tree</field>
207 <field name="arch" type="xml">
208 <tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
209 <field name="date" string="Date"/>
210 <field name="name" string="Call Summary"/>
211 <field name="partner_id" string="Partner"/>
212 <field name="partner_contact"/>
213 <field name="partner_phone"/>
214 <field name="user_id"/>
215 <field name="state" invisible="1"/>
216 <button string="Opportunity"
217 name="%(phonecall2opportunity_act)d"
218 states="draft,open,pending"
220 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
221 <button string="Meeting"
222 states="draft,open,pending" icon="gtk-redo"
223 name="action_make_meeting" type="object" />
228 <!-- Phonecalls Calendar View -->
230 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
231 <field name="name">CRM - Phone Calls Calendar</field>
232 <field name="model">crm.phonecall</field>
233 <field name="type">calendar</field>
234 <field name="priority" eval="2"/>
235 <field name="arch" type="xml">
236 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
238 <field name="partner_id"/>
243 <!-- Phonecalls Search View -->
245 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
246 <field name="name">CRM - Phone Calls Search</field>
247 <field name="model">crm.phonecall</field>
248 <field name="type">search</field>
249 <field name="arch" type="xml">
250 <search string="Search Phonecalls">
251 <filter icon="gtk-home" string="Today"
252 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),\
253 ('date','>=',datetime.strftime('%%Y-%%m-%%d 00:00:00'))]"
254 help="Todays's Phonecalls"
256 <filter icon="gtk-media-rewind"
258 help="Phonecalls during last 7 days"
259 domain="[('date','<', time.strftime('%%Y-%%m-%%d')),\
260 ('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
262 <separator orientation="vertical"/>
263 <field name="name" string="Call Summary"/>
264 <field name="partner_id"/>
265 <field name="user_id" widget="selection">
266 <filter icon="terp-partner"
267 domain="[('user_id','=',uid)]" help="My Phonecalls"
269 <filter icon="terp-partner"
270 domain="[('user_id','=',False)]"
271 help="Unassigned Phonecalls" />
273 <field name="section_id"
274 select="1" widget="selection" string="Sales Team">
275 <filter icon="terp-crm"
276 domain="[('section_id','=',context.get('section_id',False))]"
280 <group expand="0" string="Group By..." colspan="4">
281 <filter string="Partner" icon="terp-crm" domain="[]"
282 context="{'group_by':'partner_id'}" />
283 <filter string="Responsible" icon="terp-crm"
284 domain="[]" context="{'group_by':'user_id'}" />
285 <separator orientation="vertical" />
286 <filter string="Creation" icon="terp-project"
287 domain="[]" context="{'group_by':'create_date'}" />
288 <filter string="Date" icon="terp-project" domain="[]"
289 context="{'group_by':'date'}" />