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_open" string="Confirm" type="object"
47 states="draft,pending" icon="gtk-go-forward"/>
48 <button name="case_close" string="Held" type="object"
49 states="open,pending" icon="gtk-jump-to"/>
50 <button name="case_cancel" string="Cancel" type="object"
51 states="draft,open,pending" icon="gtk-cancel"/>
52 <button name="case_reset" string="Reset to Todo" type="object"
53 states="cancel" icon="gtk-convert"/>
58 <!-- Phonecalls Form View -->
60 <record model="ir.ui.view" id="crm_case_phone_form_view">
61 <field name="name">CRM - Phone Call Form</field>
62 <field name="model">crm.phonecall</field>
63 <field name="type">form</field>
64 <field name="arch" type="xml">
67 <button name="case_open" string="Confirm" type="object" class="oe_form_button_active_flow"
68 states="draft,pending" icon="gtk-go-forward"/>
69 <button name="case_close" string="Held" type="object" class="oe_form_button_active_flow"
70 states="open,pending" icon="gtk-jump-to"/>
71 <button name="case_reset" string="Reset to Todo" type="object"
72 states="cancel" icon="gtk-convert"/>
73 <button name="case_cancel" string="Cancel" type="object"
74 states="draft,open,pending" icon="gtk-cancel"/>
75 <button string="Convert to Opportunity" class="oe_form_button_active_flow"
76 name="%(phonecall2opportunity_act)d"
77 icon="gtk-index" type="action"
78 attrs="{'invisible':[('opportunity_id','!=',False)]}" />
79 <button string="Schedule Other Call"
80 icon="terp-call-start"
81 name="%(phonecall_to_phonecall_act)d"
83 <button string="Schedule a Meeting" name="action_make_meeting" icon="gtk-redo" type="object"/>
84 <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,done"/>
86 <sheet string="Phone Call">
88 <field name="name" required="1"/>
89 <field name="partner_phone"/>
90 <field name="duration" widget="float_time"/>
93 <field name="user_id"/>
94 <field name="section_id" colspan="1" widget="selection" />
98 <group string="Contacts">
99 <field name="partner_id"
100 on_change="onchange_partner_id(partner_id)" />
101 <field name="partner_mobile"/>
103 <group string="Categorization">
104 <field name="categ_id" widget="selection"
105 domain="[('object_id.model', '=', 'crm.phonecall')]"/>
106 <field name="priority"/>
107 <field name="opportunity_id"/>
110 <separator string="Description"/>
111 <field name="description"/>
114 <field name="message_ids" widget="ThreadView"/>
120 <!--Logged Phonecalls Tree View -->
122 <record model="ir.ui.view" id="crm_case_inbound_phone_tree_view">
123 <field name="name">CRM - Logged Phone Calls Tree</field>
124 <field name="model">crm.phonecall</field>
125 <field name="type">tree</field>
126 <field name="arch" type="xml">
127 <tree string="Phone Calls" fonts="bold:needaction_pending==True" editable="top">
128 <field name="needaction_pending" invisible="1"/>
131 <field name="partner_id"
132 on_change="onchange_partner_id(partner_id)"
134 <field name="partner_phone"
136 <field name="user_id"/>
137 <field name="categ_id" widget="selection"
138 domain="[('object_id.model', '=', 'crm.phonecall')]"
140 <field name="state" invisible="1"/>
141 <field name="create_date" invisible="1"/>
142 <field name="opportunity_id" invisible="1"/>
143 <button string="Schedule Other Call"
144 icon="terp-call-start"
145 name="%(phonecall_to_phonecall_act)d"
147 <button string="Meeting"
149 name="action_make_meeting" type="object" />
150 <button string="Convert to Opportunity"
151 name="%(phonecall2opportunity_act)d"
152 states="open,pending"
154 type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
159 <!-- Phonecalls Calendar View -->
161 <record model="ir.ui.view" id="crm_case_phone_calendar_view">
162 <field name="name">CRM - Phone Calls Calendar</field>
163 <field name="model">crm.phonecall</field>
164 <field name="type">calendar</field>
165 <field name="priority" eval="2"/>
166 <field name="arch" type="xml">
167 <calendar string="Phone Calls" date_start="date" color="user_id" date_delay="duration">
169 <field name="partner_id"/>
174 <!-- Phonecalls Search View -->
176 <record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
177 <field name="name">CRM - Phone Calls Search</field>
178 <field name="model">crm.phonecall</field>
179 <field name="type">search</field>
180 <field name="arch" type="xml">
181 <search string="Search Phonecalls">
182 <filter icon="terp-go-today" string="Today"
183 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
184 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
186 help="Todays's Phonecalls"
188 <filter icon="terp-go-week"
190 help="Phonecalls during last 7 days"
191 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
194 <separator orientation="vertical"/>
196 <field name="partner_id"/>
197 <field name="user_id">
198 <filter icon="terp-personal-"
199 domain="[('user_id','=',False)]"
200 help="Unassigned Phonecalls" />
202 <field name="section_id"
203 widget="selection" string="Sales Team">
204 <filter icon="terp-personal+"
205 domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
206 help="My Sales Team(s)" />
209 <group expand="0" string="Group By...">
210 <filter string="Partner" icon="terp-partner" domain="[]"
211 context="{'group_by':'partner_id'}" />
212 <filter string="Responsible" icon="terp-personal"
213 domain="[]" context="{'group_by':'user_id'}" />
214 <separator orientation="vertical" />
215 <filter string="Creation" icon="terp-go-month" help="Creation Date"
216 domain="[]" context="{'group_by':'create_date'}" />
217 <filter string="Date" icon="terp-go-month" domain="[]"
218 context="{'group_by':'date'}" help="Date of Call" />
223 <!-- Scheduled a phonecall search view-->
224 <record id="view_crm_case_scheduled_phonecalls_filter" model="ir.ui.view">
225 <field name="name">CRM - Scheduled Calls Search</field>
226 <field name="model">crm.phonecall</field>
227 <field name="type">search</field>
228 <field name="arch" type="xml">
229 <search string="Scheduled Phonecalls">
230 <filter icon="terp-gtk-go-back-rtl" string="To Do" name="current" domain="[('state','=','open')]"/>
231 <separator orientation="vertical"/>
232 <filter icon="terp-go-today" string="Today"
233 domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),
234 ('date','>=',time.strftime('%%Y-%%m-%%d 00:00:00'))]"
236 help="Todays's Phonecalls"
238 <filter icon="terp-go-week"
240 help="Phonecalls during last 7 days"
241 domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
244 <separator orientation="vertical"/>
246 <field name="partner_id"/>
247 <field name="user_id">
248 <filter icon="terp-personal-"
249 domain="[('user_id','=',False)]"
250 help="Unassigned Phonecalls" />
252 <field name="section_id"
253 widget="selection" string="Sales Team">
254 <filter icon="terp-personal+"
255 domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
256 help="My Sales Team(s)" />
259 <group expand="0" string="Group By...">
260 <filter string="Partner" icon="terp-partner" domain="[]"
261 context="{'group_by':'partner_id'}" />
262 <filter string="Responsible" icon="terp-personal"
263 domain="[]" context="{'group_by':'user_id'}" />
264 <separator orientation="vertical" />
265 <filter string="Creation" icon="terp-go-month" help="Creation Date"
266 domain="[]" context="{'group_by':'create_date'}" />
267 <filter string="Date" icon="terp-go-month" domain="[]"
268 context="{'group_by':'date'}" help="Date of Call" />