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 sort 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" required="1"/>
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)]}" />
92 <field name="partner_address_id"
93 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
95 <field name="partner_mobile" />
97 <group col="2" colspan="2">
98 <separator colspan="2" string="Categorization" />
99 <field name="categ_id" widget="selection"
100 domain="[('object_id.model', '=', 'crm.phonecall')]"
102 <field name="priority"/>
103 <field name="opportunity_id"/>
105 <separator string="Description" colspan="4" />
106 <field name="description" nolabel="1" colspan="4" />
107 <separator colspan="4" />
108 <group col="8" colspan="4">
109 <field name="state" select="1" />
110 <button name="case_cancel" string="Cancel"
111 states="draft,open,pending" type="object"
113 <button name="case_open" string="Open"
114 states="draft,pending" type="object"
115 icon="gtk-go-forward" />
116 <button name="case_pending" string="Not Held"
117 states="open" type="object" icon="gtk-media-pause" />
118 <button name="case_close" string="Held"
119 states="open,draft,pending" type="object"
120 icon="gtk-jump-to" />
121 <button name="case_reset" string="Reset to Draft"
122 states="done,cancel" type="object"
123 icon="gtk-convert" />
129 <!--Inbound Phonecalls Form View -->
131 <record model="ir.ui.view" id="crm_case_inbound_phone_form_view">
132 <field name="name">CRM - Inbound Phone Call Form</field>
133 <field name="model">crm.phonecall</field>
134 <field name="type">form</field>
135 <field name="arch" type="xml">
136 <form string="Phone Call">
137 <group colspan="4" col="7">
138 <field name="name" required="1"/>
139 <field name="partner_phone"/>
140 <field name="duration" widget="float_time"/>
141 <button string="Schedule a Meeting"
142 name="action_make_meeting"
146 <field name="date" required="1"/>
147 <field name="user_id"/>
148 <field name="section_id" colspan="1" widget="selection" />
149 <button string="Convert to Opportunity"
150 name="%(phonecall2opportunity_act)d"
151 icon="gtk-index" type="action"
152 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
153 <label colspan="6" string=""/>
154 <button string="Schedule Other Call"
155 icon="terp-call-start"
156 name="%(phonecall_to_phonecall_act)d"
160 <group col="3" colspan="2">
161 <separator colspan="3" string="Contacts" />
162 <field name="partner_id"
163 on_change="onchange_partner_id(partner_id, email_from)" />
164 <button string="Create a Partner"
166 name="%(action_crm_phonecall2partner)d"
168 attrs="{'invisible':[('partner_id','!=',False)]}" />
170 <field name="partner_address_id"
171 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
173 <field name="partner_mobile" />
175 <group col="2" colspan="2">
176 <separator colspan="2" string="Categorization" />
177 <field name="categ_id" widget="selection"
178 domain="[('object_id.model', '=', 'crm.phonecall')]"
180 <field name="priority"/>
181 <field name="opportunity_id"/>
183 <separator string="Description" colspan="4" />
184 <field name="description" nolabel="1" colspan="4" />
185 <separator colspan="4" />
190 <!--Inbound Phonecalls Tree View -->
192 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
193 <field name="name">CRM - Inbound Phone Calls Tree</field>
194 <field name="model">crm.phonecall</field>
195 <field name="type">tree</field>
196 <field name="arch" type="xml">
197 <tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
200 <field name="partner_id"
201 on_change="onchange_partner_id(partner_id, email_from)"
203 <field name="partner_address_id"
204 on_change="onchange_partner_address_id(partner_address_id, email_from)" />
205 <field name="partner_phone"/>
206 <field name="user_id"/>
207 <field name="categ_id" widget="selection"
208 domain="[('object_id.model', '=', 'crm.phonecall')]"
210 <field name="state" invisible="1"/>
211 <field name="create_date" invisible="1"/>
212 <button string="Schedule Other Call"
213 icon="terp-call-start"
214 name="%(phonecall_to_phonecall_act)d"
216 <button string="Convert to 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="terp-check" string="Current"
253 domain="[('state','in', ('draft','open','pending'))]"/>
254 <filter icon="terp-go-today" string="Today"
255 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
256 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
258 help="Todays's Phonecalls"
260 <filter icon="terp-go-week"
262 help="Phonecalls during last 7 days"
263 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
266 <separator orientation="vertical"/>
268 <field name="partner_id"/>
269 <field name="user_id">
270 <filter icon="terp-personal-"
271 domain="[('user_id','=',False)]"
272 help="Unassigned Phonecalls" />
274 <field name="section_id"
275 select="1" widget="selection" string="Sales Team">
276 <filter icon="terp-personal+" groups="base.group_extended"
277 domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
278 help="My Sales Team(s)" />
281 <group expand="0" string="Group By..." colspan="4">
282 <filter string="Partner" icon="terp-partner" domain="[]"
283 context="{'group_by':'partner_id'}" />
284 <filter string="Responsible" icon="terp-personal"
285 domain="[]" context="{'group_by':'user_id'}" />
286 <separator orientation="vertical" />
287 <filter string="Creation" icon="terp-go-month" help="Creation Date"
288 domain="[]" context="{'group_by':'create_date'}" />
289 <filter string="Date" icon="terp-go-month" domain="[]"
290 context="{'group_by':'date'}" help="Date of Call" />