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>
14 <field name="help">Create specific phone call categories to better define the type of calls tracked in the system.</field>
17 <menuitem action="crm_phonecall_categ_action" name="Categories"
18 id="menu_crm_case_phonecall-act" parent="menu_crm_config_phonecall" />
20 <!-- PhoneCalls Tree View -->
22 <record model="ir.ui.view" id="crm_case_phone_tree_view">
23 <field name="name">CRM - Phone Calls Tree</field>
24 <field name="model">crm.phonecall</field>
25 <field name="type">tree</field>
26 <field name="arch" type="xml">
27 <tree colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
30 <field name="partner_id"/>
31 <field name="partner_contact"/>
32 <field name="partner_phone"/>
33 <field name="user_id"/>
34 <field name="categ_id" string="Type"/>
35 <field name="create_date" invisible="1"/>
36 <button string="Convert to Opportunity"
37 name="%(phonecall2opportunity_act)d"
38 states="draft,open,pending"
40 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
41 <button string="Meeting"
42 states="draft,open,pending" icon="gtk-redo"
43 name="action_make_meeting" type="object" />
45 <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
46 <button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
47 <button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
48 <button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
53 <!-- Phonecalls Form View -->
55 <record model="ir.ui.view" id="crm_case_phone_form_view">
56 <field name="name">CRM - Phone Call Form</field>
57 <field name="model">crm.phonecall</field>
58 <field name="type">form</field>
59 <field name="arch" type="xml">
60 <form string="Phone Call">
61 <group colspan="6" col="7">
62 <field name="name" required="1"/>
63 <field name="partner_phone"/>
64 <field name="duration" widget="float_time" required="1"/>
65 <button string="Schedule a Meeting" name="action_make_meeting" icon="gtk-redo" type="object"/>
67 <field name="date" required="1"/>
68 <field name="user_id"/>
69 <field name="section_id" colspan="1" widget="selection" />
70 <button string="Convert to Opportunity"
71 name="%(phonecall2opportunity_act)d"
72 icon="gtk-index" type="action"
73 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
74 <label colspan="6" string=""/>
75 <button string="Schedule Other Call"
76 icon="terp-call-start"
77 name="%(phonecall_to_phonecall_act)d"
82 <group col="3" colspan="2">
83 <separator colspan="3" string="Contacts" />
84 <field name="partner_id"
85 on_change="onchange_partner_id(partner_id, email_from)" />
86 <button string="Create a Partner"
88 name="%(action_crm_phonecall2partner)d"
90 attrs="{'invisible':[('partner_id','!=',False)]}"
91 groups="base.group_partner_manager"/>
93 <field name="partner_address_id"
94 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
96 <field name="partner_mobile" />
98 <group col="2" colspan="2">
99 <separator colspan="2" string="Categorization" />
100 <field name="categ_id" widget="selection"
101 domain="[('object_id.model', '=', 'crm.phonecall')]"
103 <field name="priority"/>
104 <field name="opportunity_id"/>
106 <separator string="Description" colspan="4" />
107 <field name="description" nolabel="1" colspan="4" />
108 <separator colspan="4" />
109 <group col="8" colspan="4">
110 <field name="state" select="1" />
111 <button name="case_cancel" string="Cancel"
112 states="draft,open,pending" type="object"
114 <button name="case_open" string="Open"
115 states="draft,pending" type="object"
116 icon="gtk-go-forward" />
117 <button name="case_pending" string="Not Held"
118 states="open" type="object" icon="gtk-media-pause" />
119 <button name="case_close" string="Held"
120 states="open,draft,pending" type="object"
121 icon="gtk-jump-to" />
122 <button name="case_reset" string="Reset to Draft"
123 states="done,cancel" type="object"
124 icon="gtk-convert" />
130 <!--Inbound Phonecalls Form View -->
132 <record model="ir.ui.view" id="crm_case_inbound_phone_form_view">
133 <field name="name">CRM - Inbound Phone Call Form</field>
134 <field name="model">crm.phonecall</field>
135 <field name="type">form</field>
136 <field name="arch" type="xml">
137 <form string="Phone Call">
138 <group colspan="4" col="7">
139 <field name="name" required="1"/>
140 <field name="partner_phone"/>
141 <field name="duration" widget="float_time"/>
142 <button string="Schedule a Meeting"
143 name="action_make_meeting"
147 <field name="date" required="1"/>
148 <field name="user_id"/>
149 <field name="section_id" colspan="1" widget="selection" />
150 <button string="Convert to Opportunity"
151 name="%(phonecall2opportunity_act)d"
152 icon="gtk-index" type="action"
153 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
154 <label colspan="6" string=""/>
155 <button string="Schedule Other Call"
156 icon="terp-call-start"
157 name="%(phonecall_to_phonecall_act)d"
161 <group col="3" colspan="2">
162 <separator colspan="3" string="Contacts" />
163 <field name="partner_id"
164 on_change="onchange_partner_id(partner_id, email_from)" />
165 <button string="Create a Partner"
167 name="%(action_crm_phonecall2partner)d"
169 attrs="{'invisible':[('partner_id','!=',False)]}"
170 groups="base.group_partner_manager" />
172 <field name="partner_address_id"
173 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
175 <field name="partner_mobile" />
177 <group col="2" colspan="2">
178 <separator colspan="2" string="Categorization" />
179 <field name="categ_id" widget="selection"
180 domain="[('object_id.model', '=', 'crm.phonecall')]"
182 <field name="priority"/>
183 <field name="opportunity_id"/>
185 <separator string="Description" colspan="4" />
186 <field name="description" nolabel="1" colspan="4" />
187 <separator colspan="4" />
192 <!--Inbound Phonecalls Tree View -->
194 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
195 <field name="name">CRM - Inbound Phone Calls Tree</field>
196 <field name="model">crm.phonecall</field>
197 <field name="type">tree</field>
198 <field name="arch" type="xml">
199 <tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
202 <field name="partner_id"
203 on_change="onchange_partner_id(partner_id, email_from)"
205 <field name="partner_address_id"
206 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
207 <field name="partner_phone"/>
208 <field name="user_id"/>
209 <field name="categ_id" widget="selection"
210 domain="[('object_id.model', '=', 'crm.phonecall')]"
212 <field name="state" invisible="1"/>
213 <field name="create_date" invisible="1"/>
214 <button string="Schedule Other Call"
215 icon="terp-call-start"
216 name="%(phonecall_to_phonecall_act)d"
218 <button string="Convert to Opportunity"
219 name="%(phonecall2opportunity_act)d"
220 states="draft,open,pending"
222 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
223 <button string="Meeting"
224 states="draft,open,pending" icon="gtk-redo"
225 name="action_make_meeting" type="object" />
230 <!-- Phonecalls Calendar View -->
232 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
233 <field name="name">CRM - Phone Calls Calendar</field>
234 <field name="model">crm.phonecall</field>
235 <field name="type">calendar</field>
236 <field name="priority" eval="2"/>
237 <field name="arch" type="xml">
238 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
240 <field name="partner_id"/>
245 <!-- Phonecalls Search View -->
247 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
248 <field name="name">CRM - Phone Calls Search</field>
249 <field name="model">crm.phonecall</field>
250 <field name="type">search</field>
251 <field name="arch" type="xml">
252 <search string="Search Phonecalls">
253 <filter icon="terp-check" string="Current"
255 domain="[('state','in', ('draft','open','pending'))]"/>
256 <filter icon="terp-go-today" string="Today"
257 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
258 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
260 help="Todays's Phonecalls"
262 <filter icon="terp-go-week"
264 help="Phonecalls during last 7 days"
265 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
268 <separator orientation="vertical"/>
270 <field name="partner_id"/>
271 <field name="user_id">
272 <filter icon="terp-personal-"
273 domain="[('user_id','=',False)]"
274 help="Unassigned Phonecalls" />
276 <field name="section_id"
277 select="1" widget="selection" string="Sales Team">
278 <filter icon="terp-personal+" groups="base.group_extended"
279 domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
280 help="My Sales Team(s)" />
283 <group expand="0" string="Group By..." colspan="4">
284 <filter string="Partner" icon="terp-partner" domain="[]"
285 context="{'group_by':'partner_id'}" />
286 <filter string="Responsible" icon="terp-personal"
287 domain="[]" context="{'group_by':'user_id'}" />
288 <separator orientation="vertical" />
289 <filter string="Creation" icon="terp-go-month" help="Creation Date"
290 domain="[]" context="{'group_by':'create_date'}" />
291 <filter string="Date" icon="terp-go-month" domain="[]"
292 context="{'group_by':'date'}" help="Date of Call" />