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" eval="{'object_id': ref('model_crm_phonecall')}"/>
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" groups="base.group_no_one"/>
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 fonts="bold:needaction_pending==True" colors="gray:state in ('cancel','done');blue:state in ('pending',)" string="Phone Calls">
28 <field name="needaction_pending" invisible="1"/>
31 <field name="partner_id"/>
32 <field name="partner_phone"/>
33 <field name="user_id"/>
34 <field name="categ_id" invisible="1"/>
35 <field name="create_date" invisible="1"/>
36 <field name="opportunity_id" invisible="1"/>
37 <button string="Convert to Opportunity"
38 name="%(phonecall2opportunity_act)d"
41 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
42 <button string="Meeting"
43 states="open,pending" icon="gtk-redo"
44 name="action_make_meeting" type="object" />
46 <button name="case_cancel" string="Cancel" states="open,pending" type="object" icon="gtk-cancel"/>
47 <button name="case_open" string="Todo" states="pending" type="object" icon="gtk-go-forward"/>
48 <button name="case_close" string="Held" states="open,pending" type="object" icon="gtk-jump-to"/>
49 <button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
54 <!-- Phonecalls Form View -->
56 <record model="ir.ui.view" id="crm_case_phone_form_view">
57 <field name="name">CRM - Phone Call Form</field>
58 <field name="model">crm.phonecall</field>
59 <field name="type">form</field>
60 <field name="arch" type="xml">
61 <form layout="manual">
62 <sheet string="Phone Call" layout="auto">
63 <group colspan="6" col="7">
64 <field name="name" required="1"/>
65 <field name="partner_phone"/>
66 <field name="duration" widget="float_time"/>
67 <button string="Schedule a Meeting" name="action_make_meeting" icon="gtk-redo" type="object"/>
70 <field name="user_id"/>
71 <field name="section_id" colspan="1" widget="selection" />
72 <button string="Schedule Other Call"
73 icon="terp-call-start"
74 name="%(phonecall_to_phonecall_act)d"
76 <label colspan="6" string=""/>
77 <button string="Convert to Opportunity"
78 name="%(phonecall2opportunity_act)d"
79 icon="gtk-index" type="action"
80 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
84 <group col="3" colspan="2">
85 <separator colspan="3" string="Contacts" />
86 <field name="partner_id"
87 on_change="onchange_partner_id(partner_id)" />
88 <button string="Create a Partner"
90 name="%(action_crm_phonecall2partner)d"
92 attrs="{'invisible':[('partner_id','!=',False)]}"
93 groups="base.group_partner_manager"/>
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')]"/>
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" widget="statusbar" statusbar_visible="open,done" statusbar_colors='{"pending":"red"}' select="1"/>
110 <button name="case_cancel" string="Cancel"
111 states="open,pending" type="object"
113 <button name="case_open" string="Todo"
114 states="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,pending" type="object"
120 icon="gtk-jump-to" />
121 <button name="case_reset" string="Reset to Todo"
122 states="cancel" type="object"
123 icon="gtk-convert" />
126 <div class="oe_form_sheet_width">
127 <field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
133 <!--Logged Phonecalls Tree View -->
135 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
136 <field name="name">CRM - Logged Phone Calls Tree</field>
137 <field name="model">crm.phonecall</field>
138 <field name="type">tree</field>
139 <field name="arch" type="xml">
140 <tree string="Phone Calls" fonts="bold:needaction_pending==True" editable="top">
141 <field name="needaction_pending" invisible="1"/>
144 <field name="partner_id"
145 on_change="onchange_partner_id(partner_id)"
147 <field name="partner_phone"
149 <field name="user_id"/>
150 <field name="categ_id" widget="selection"
151 domain="[('object_id.model', '=', 'crm.phonecall')]"
153 <field name="state" invisible="1"/>
154 <field name="create_date" invisible="1"/>
155 <field name="opportunity_id" invisible="1"/>
156 <button string="Schedule Other Call"
157 icon="terp-call-start"
158 name="%(phonecall_to_phonecall_act)d"
160 <button string="Meeting"
162 name="action_make_meeting" type="object" />
163 <button string="Convert to Opportunity"
164 name="%(phonecall2opportunity_act)d"
165 states="open,pending"
167 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
172 <!-- Phonecalls Calendar View -->
174 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
175 <field name="name">CRM - Phone Calls Calendar</field>
176 <field name="model">crm.phonecall</field>
177 <field name="type">calendar</field>
178 <field name="priority" eval="2"/>
179 <field name="arch" type="xml">
180 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
182 <field name="partner_id"/>
187 <!-- Phonecalls Search View -->
189 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
190 <field name="name">CRM - Phone Calls Search</field>
191 <field name="model">crm.phonecall</field>
192 <field name="type">search</field>
193 <field name="arch" type="xml">
194 <search string="Search Phonecalls">
195 <filter icon="terp-go-today" string="Today"
196 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
197 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
199 help="Todays's Phonecalls"
201 <filter icon="terp-go-week"
203 help="Phonecalls during last 7 days"
204 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
207 <separator orientation="vertical"/>
209 <field name="partner_id"/>
210 <field name="user_id">
211 <filter icon="terp-personal-"
212 domain="[('user_id','=',False)]"
213 help="Unassigned Phonecalls" />
215 <field name="section_id"
216 widget="selection" string="Sales Team">
217 <filter icon="terp-personal+"
218 domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
219 help="My Sales Team(s)" />
222 <group expand="0" string="Group By...">
223 <filter string="Partner" icon="terp-partner" domain="[]"
224 context="{'group_by':'partner_id'}" />
225 <filter string="Responsible" icon="terp-personal"
226 domain="[]" context="{'group_by':'user_id'}" />
227 <separator orientation="vertical" />
228 <filter string="Creation" icon="terp-go-month" help="Creation Date"
229 domain="[]" context="{'group_by':'create_date'}" />
230 <filter string="Date" icon="terp-go-month" domain="[]"
231 context="{'group_by':'date'}" help="Date of Call" />
236 <!-- Scheduled a phonecall search view-->
237 <record id="view_crm_case_scheduled_phonecalls_filter" model="ir.ui.view">
238 <field name="name">CRM - Scheduled Calls Search</field>
239 <field name="model">crm.phonecall</field>
240 <field name="type">search</field>
241 <field name="arch" type="xml">
242 <search string="Scheduled Phonecalls">
243 <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
244 <separator orientation="vertical"/>
245 <filter icon="terp-go-today" string="Today"
246 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
247 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
249 help="Todays's Phonecalls"
251 <filter icon="terp-go-week"
253 help="Phonecalls during last 7 days"
254 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
257 <separator orientation="vertical"/>
259 <field name="partner_id"/>
260 <field name="user_id">
261 <filter icon="terp-personal-"
262 domain="[('user_id','=',False)]"
263 help="Unassigned Phonecalls" />
265 <field name="section_id"
266 widget="selection" string="Sales Team">
267 <filter icon="terp-personal+"
268 domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
269 help="My Sales Team(s)" />
272 <group expand="0" string="Group By...">
273 <filter string="Partner" icon="terp-partner" domain="[]"
274 context="{'group_by':'partner_id'}" />
275 <filter string="Responsible" icon="terp-personal"
276 domain="[]" context="{'group_by':'user_id'}" />
277 <separator orientation="vertical" />
278 <filter string="Creation" icon="terp-go-month" help="Creation Date"
279 domain="[]" context="{'group_by':'create_date'}" />
280 <filter string="Date" icon="terp-go-month" domain="[]"
281 context="{'group_by':'date'}" help="Date of Call" />