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" />
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" 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 string="Phone Call">
62 <group colspan="6" col="7">
63 <field name="name" required="1"/>
64 <field name="partner_phone"/>
65 <field name="duration" widget="float_time"/>
66 <button string="Schedule a Meeting" name="action_make_meeting" icon="gtk-redo" type="object"/>
69 <field name="user_id"/>
70 <field name="section_id" colspan="1" widget="selection" />
71 <button string="Schedule Other Call"
72 icon="terp-call-start"
73 name="%(phonecall_to_phonecall_act)d"
75 <label colspan="6" string=""/>
76 <button string="Convert to Opportunity"
77 name="%(phonecall2opportunity_act)d"
78 icon="gtk-index" type="action"
79 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
83 <group col="3" colspan="2">
84 <separator colspan="3" string="Contacts" />
85 <field name="partner_id"
86 on_change="onchange_partner_id(partner_id)" />
87 <button string="Create a Partner"
89 name="%(action_crm_phonecall2partner)d"
91 attrs="{'invisible':[('partner_id','!=',False)]}"
92 groups="base.group_partner_manager"/>
94 <field name="partner_address_id"
95 on_change="onchange_partner_address_id(partner_address_id)" />
97 <field name="partner_mobile" />
99 <group col="2" colspan="2">
100 <separator colspan="2" string="Categorization" />
101 <field name="categ_id" widget="selection"
102 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" widget="statusbar" statusbar_visible="open,done" statusbar_colors='{"pending":"red"}' select="1"/>
111 <button name="case_cancel" string="Cancel"
112 states="open,pending" type="object"
114 <button name="case_open" string="Todo"
115 states="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,pending" type="object"
121 icon="gtk-jump-to" />
122 <button name="case_reset" string="Reset to Todo"
123 states="cancel" type="object"
124 icon="gtk-convert" />
130 <!--Logged Phonecalls Tree View -->
132 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
133 <field name="name">CRM - Logged Phone Calls Tree</field>
134 <field name="model">crm.phonecall</field>
135 <field name="type">tree</field>
136 <field name="arch" type="xml">
137 <tree string="Phone Calls" editable="top">
140 <field name="partner_id"
141 on_change="onchange_partner_id(partner_id)"
143 <field name="partner_address_id"
144 on_change="onchange_partner_address_id(partner_address_id)"
146 <field name="partner_phone"
148 <field name="user_id" groups="base.group_extended"/>
149 <field name="categ_id" widget="selection"
150 domain="[('object_id.model', '=', 'crm.phonecall')]"
152 <field name="state" invisible="1"/>
153 <field name="create_date" invisible="1"/>
154 <field name="opportunity_id" invisible="1"/>
155 <button string="Schedule Other Call"
156 icon="terp-call-start"
157 name="%(phonecall_to_phonecall_act)d"
159 <button string="Meeting"
161 name="action_make_meeting" type="object" />
162 <button string="Convert to Opportunity"
163 name="%(phonecall2opportunity_act)d"
164 states="open,pending"
166 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
171 <!-- Phonecalls Calendar View -->
173 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
174 <field name="name">CRM - Phone Calls Calendar</field>
175 <field name="model">crm.phonecall</field>
176 <field name="type">calendar</field>
177 <field name="priority" eval="2"/>
178 <field name="arch" type="xml">
179 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
181 <field name="partner_id"/>
186 <!-- Phonecalls Search View -->
188 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
189 <field name="name">CRM - Phone Calls Search</field>
190 <field name="model">crm.phonecall</field>
191 <field name="type">search</field>
192 <field name="arch" type="xml">
193 <search string="Search Phonecalls">
194 <filter icon="terp-go-today" string="Today"
195 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
196 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
198 help="Todays's Phonecalls"
200 <filter icon="terp-go-week"
202 help="Phonecalls during last 7 days"
203 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
206 <separator orientation="vertical"/>
208 <field name="partner_id"/>
209 <field name="user_id">
210 <filter icon="terp-personal-"
211 domain="[('user_id','=',False)]"
212 help="Unassigned Phonecalls" />
214 <field name="section_id"
215 widget="selection" string="Sales Team">
216 <filter icon="terp-personal+" groups="base.group_extended"
217 domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
218 help="My Sales Team(s)" />
221 <group expand="0" string="Group By...">
222 <filter string="Partner" icon="terp-partner" domain="[]"
223 context="{'group_by':'partner_id'}" />
224 <filter string="Responsible" icon="terp-personal"
225 domain="[]" context="{'group_by':'user_id'}" />
226 <separator orientation="vertical" />
227 <filter string="Creation" icon="terp-go-month" help="Creation Date"
228 domain="[]" context="{'group_by':'create_date'}" />
229 <filter string="Date" icon="terp-go-month" domain="[]"
230 context="{'group_by':'date'}" help="Date of Call" />
235 <!-- Scheduled a phonecall search view-->
236 <record id="view_crm_case_scheduled_phonecalls_filter" model="ir.ui.view">
237 <field name="name">CRM - Scheduled Calls Search</field>
238 <field name="model">crm.phonecall</field>
239 <field name="type">search</field>
240 <field name="arch" type="xml">
241 <search string="Scheduled Phonecalls">
242 <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
243 <separator orientation="vertical"/>
244 <filter icon="terp-go-today" string="Today"
245 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
246 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
248 help="Todays's Phonecalls"
250 <filter icon="terp-go-week"
252 help="Phonecalls during last 7 days"
253 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
256 <separator orientation="vertical"/>
258 <field name="partner_id"/>
259 <field name="user_id">
260 <filter icon="terp-personal-"
261 domain="[('user_id','=',False)]"
262 help="Unassigned Phonecalls" />
264 <field name="section_id"
265 widget="selection" string="Sales Team">
266 <filter icon="terp-personal+" groups="base.group_extended"
267 domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
268 help="My Sales Team(s)" />
271 <group expand="0" string="Group By...">
272 <filter string="Partner" icon="terp-partner" domain="[]"
273 context="{'group_by':'partner_id'}" />
274 <filter string="Responsible" icon="terp-personal"
275 domain="[]" context="{'group_by':'user_id'}" />
276 <separator orientation="vertical" />
277 <filter string="Creation" icon="terp-go-month" help="Creation Date"
278 domain="[]" context="{'group_by':'create_date'}" />
279 <filter string="Date" icon="terp-go-month" domain="[]"
280 context="{'group_by':'date'}" help="Date of Call" />