5 <!-- Read/Unread actions -->
6 <record id="actions_server_crm_lead_unread" model="ir.actions.server">
7 <field name="name">Mark unread</field>
8 <field name="condition">True</field>
9 <field name="type">ir.actions.server</field>
10 <field name="model_id" ref="model_crm_lead"/>
11 <field name="state">code</field>
12 <field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
14 <record id="action_crm_lead_unread" model="ir.values">
15 <field name="name">action_crm_lead_unread</field>
16 <field name="action_id" ref="actions_server_crm_lead_unread"/>
17 <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_unread'))" />
18 <field name="key">action</field>
19 <field name="model_id" ref="model_crm_lead" />
20 <field name="model">crm.lead</field>
21 <field name="key2">client_action_multi</field>
24 <record id="actions_server_crm_lead_read" model="ir.actions.server">
25 <field name="name">Mark read</field>
26 <field name="condition">True</field>
27 <field name="type">ir.actions.server</field>
28 <field name="model_id" ref="model_crm_lead"/>
29 <field name="state">code</field>
30 <field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
32 <record id="action_crm_lead_read" model="ir.values">
33 <field name="name">action_crm_lead_read</field>
34 <field name="action_id" ref="actions_server_crm_lead_read"/>
35 <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_read'))" />
36 <field name="key">action</field>
37 <field name="model_id" ref="model_crm_lead" />
38 <field name="model">crm.lead</field>
39 <field name="key2">client_action_multi</field>
46 <!-- Stage Search view -->
47 <record id="crm_lead_stage_search" model="ir.ui.view">
48 <field name="name">Stage - Search</field>
49 <field name="model">crm.case.stage</field>
50 <field name="type">search</field>
51 <field name="arch" type="xml">
52 <search string="Stage Search">
53 <field name="name" string="Stage Name"/>
54 <separator orientation="vertical"/>
61 <!-- Stage Form view -->
62 <record id="crm_lead_stage_act" model="ir.actions.act_window">
63 <field name="name">Stages</field>
64 <field name="res_model">crm.case.stage</field>
65 <field name="view_type">form</field>
66 <field name="view_id" ref="crm.crm_case_stage_tree"/>
67 <field name="help">Add specific stages to leads and opportunities allowing your sales to better organise their sales pipeline. Stages will allow them to easily track how a specific lead or opportunity is positioned in the sales cycle.</field>
70 <menuitem action="crm_lead_stage_act" id="menu_crm_lead_stage_act" name="Stages" sequence="0" parent="base.menu_crm_config_lead" />
73 LEADS/OPPORTUNITIES CATEGORIES
76 <!-- Categories Form View -->
77 <record id="crm_lead_categ_action" model="ir.actions.act_window">
78 <field name="name">Categories</field>
79 <field name="res_model">crm.case.categ</field>
80 <field name="view_type">form</field>
81 <field name="view_id" ref="crm_case_categ_tree-view"/>
82 <field name="context" eval="{'object_id': ref('model_crm_lead')}"/>
83 <field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
84 <field name="help">Create specific categories that fit your company's activities to better classify and analyse your leads and opportunities. Such categories could for instance reflect your product structure or the different types of sales you do.</field>
87 <menuitem action="crm_lead_categ_action"
88 id="menu_crm_lead_categ" name="Categories"
89 parent="base.menu_crm_config_lead" sequence="1" groups="base.group_no_one"/>
95 id="act_crm_opportunity_crm_phonecall_new"
97 groups="base.group_sale_salesman"
98 res_model="crm.phonecall"
99 view_mode="tree,calendar,form"
100 context="{'default_duration': 1.0 ,'default_opportunity_id': active_id,'default_partner_phone':phone}"
101 domain="[('opportunity_id', '=', active_id)]"
105 id="act_crm_opportunity_crm_meeting_new"
107 res_model="crm.meeting"
108 view_mode="tree,form,calendar"
109 context="{'default_duration': 4.0, 'default_opportunity_id': active_id}"
110 domain="[('opportunity_id', '=', active_id)]"
114 <!-- CRM Lead Form View -->
115 <record model="ir.ui.view" id="crm_case_form_view_leads">
116 <field name="name">CRM - Leads Form</field>
117 <field name="model">crm.lead</field>
118 <field name="type">form</field>
119 <field name="arch" type="xml">
120 <form string="Leads Form" version="7.0">
122 <button name="%(crm.action_crm_lead2opportunity_partner)d" string="Convert to Opportunity" type="action"
123 states="draft,open,pending" help="Convert to Opportunity" class="oe_highlight"/>
124 <button name="case_escalate" string="Escalate" type="object"
125 states="draft,open,pending"/>
126 <button name="case_reset" string="Reset" type="object"
128 <button name="case_cancel" string="Cancel" type="object"
129 states="draft,open,pending"/>
130 <field name="stage_id" widget="statusbar"
131 on_change="onchange_stage_id(stage_id)"/>
134 <div class="oe_right oe_button_box" name="buttons">
135 <button type="action"
136 name="%(act_crm_opportunity_crm_meeting_new)d"
139 <button type="action"
140 name="%(act_crm_opportunity_crm_phonecall_new)d"
141 string="Phone Calls" />
143 <div class="oe_title">
144 <label for="name" class="oe_edit_only" string="Lead Description"/>
145 <h1><field name="name" placeholder="Describe the lead..."/></h1>
149 <field name="user_id" />
150 <field name="section_id" widget="selection" />
151 <field name="type" invisible="1"/>
154 <field name="priority"/>
155 <field name="categ_id"
157 domain="[('object_id.model','=','crm.lead')]"/>
160 <field name="partner_name" string="Company Name"/>
161 <field name="partner_id" string="Customer"/>
162 <label for="street" string="Address"/>
164 <field name="street" placeholder="Street..."/>
165 <field name="street2"/>
167 <field name="zip" class="oe_inline" placeholder="ZIP"/>
168 <field name="city" class="oe_inline" placeholder="City"/>
170 <field name="state_id" placeholder="State"/>
171 <field name="country_id" placeholder="Country"/>
175 <label for="contact_name" />
177 <field name="contact_name" class="oe_inline"/>,
178 <field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" class="oe_inline"/>
180 <field name="email_from" widget="email"/>
181 <field name="function" />
182 <field name="phone"/>
183 <field name="mobile"/>
186 This should be integrated in Open Chatter
187 <button string="Mail"
188 name="%(mail.action_email_compose_message_wizard)d"
189 icon="terp-mail-message-new" type="action" colspan="1"/>
193 <notebook colspan="4">
194 <page string="Notes">
195 <field name="description"/>
197 <page string="Extra Info">
199 <group string="Categorization">
200 <field name="company_id"
201 groups="base.group_multi_company"
202 widget="selection" colspan="2" />
203 <field name="type_id" widget="selection"/>
204 <field name="channel_id" widget="selection"/>
205 <field name="referred"/>
206 <field name="state" groups="base.group_no_one"/>
208 <group string="Mailings">
209 <field name="opt_in" on_change="on_change_opt_in(opt_in)"/>
210 <field name="opt_out" on_change="on_change_opt_out(opt_out)"/>
216 <div class="oe_chatter">
217 <field name="message_ids" widget="mail_thread"/>
223 <!-- CRM Lead Tree View -->
224 <record model="ir.ui.view" id="crm_case_tree_view_leads">
225 <field name="name">Leads</field>
226 <field name="model">crm.lead</field>
227 <field name="type">tree</field>
228 <field name="arch" type="xml">
229 <tree string="Leads" fonts="bold:needaction_pending==True" colors="grey:state in ('cancel', 'done')">
230 <field name="date_deadline" invisible="1"/>
231 <field name="create_date" groups="base.group_no_one"/>
233 <field name="contact_name"/>
234 <field name="country_id" invisible="context.get('invisible_country', True)" />
235 <field name="email_from"/>
236 <field name="phone"/>
237 <field name="stage_id"/>
238 <field name="categ_id" invisible="1"/>
239 <field name="section_id" invisible="context.get('invisible_section', True)" />
240 <field name="state" groups="base.group_no_one"/>
241 <field name="type_id" invisible="1"/>
242 <field name="referred" invisible="1"/>
243 <field name="channel_id" invisible="1"/>
244 <field name="subjects" invisible="1"/>
245 <field name="needaction_pending" invisible="1"/>
250 <!-- CRM Lead Calendar View -->
251 <record model="ir.ui.view" id="crm_case_calendar_view_leads">
252 <field name="name">CRM - Leads Calendar</field>
253 <field name="model">crm.lead</field>
254 <field name="type">calendar</field>
255 <field name="priority" eval="2"/>
256 <field name="arch" type="xml">
257 <calendar string="Leads Generation"
258 date_start="date_action" color="user_id">
259 <field name="name" />
260 <field name="partner_name" />
265 <!-- CRM Lead Kanban View -->
266 <record model="ir.ui.view" id="crm_case_kanban_view_leads">
267 <field name="name">CRM - Leads Kanban</field>
268 <field name="model">crm.lead</field>
269 <field name="type">kanban</field>
270 <field name="arch" type="xml">
271 <kanban default_group_by="stage_id">
272 <field name="state" groups="base.group_no_one"/>
273 <field name="color"/>
274 <field name="priority"/>
275 <field name="planned_revenue" sum="Expected Revenues"/>
276 <field name="user_email"/>
277 <field name="user_id"/>
278 <field name="partner_address_email"/>
279 <field name="message_summary"/>
280 <field name="needaction_pending"/>
282 <t t-name="lead_details">
283 <ul class="oe_kanban_tooltip">
284 <li t-if="record.phone.raw_value"><b>Phone:</b> <field name="phone"/></li>
285 <li><b>Probability:</b> <field name="probability"/>%%</li>
286 <li><b>Creation date:</b> <field name="create_date"/></li>
287 <li t-if="record.date_deadline.raw_value"><b>Date Deadline:</b> <field name="date_deadline"/></li>
290 <t t-name="kanban-box">
291 <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
292 <div class="oe_dropdown_toggle oe_dropdown_kanban">
293 <span class="oe_e">Ã</span>
294 <ul class="oe_dropdown_menu">
295 <li><a type="edit" >Edit...</a></li>
296 <li><a type="delete">Delete</a></li>
297 <li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
298 <li><a name="%(opportunity2phonecall_act)d" type="action">Log Call</a></li>
299 <li><a name="action_makeMeeting" type="object">Schedule Meeting</a></li>
300 <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
303 <div class="oe_kanban_content">
305 <b><field name="name"/></b>
306 <t t-if="record.planned_revenue.raw_value">
307 - <b><t t-esc="Math.round(record.planned_revenue.value)"/>
308 <field name="company_currency"/></b>
312 <field name="partner_id"/>
314 <div style="padding-left: 0.5em">
315 <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
316 <span t-attf-class="#{red || ''}"><field name="date_action"/></span>
317 <t t-if="record.date_action.raw_value"> : </t>
318 <field name="title_action"/>
320 <div class="oe_kanban_bottom_right">
321 <a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>
322 <a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>
324 <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kaban_status_red</t>
325 <span t-attf-class="oe_kanban_status #{red}"> </span>
327 <img t-att-src="kanban_image('res.users', 'avatar', record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
329 <div class="oe_kanban_footer_left">
330 <t t-if="record.needaction_pending.raw_value"><span class="oe_kanban_mail_new">New</span></t>
331 <t t-raw="record.message_summary.raw_value"/>
334 <div class="oe_clear"></div>
337 <div class="oe_kanban_right">
338 <a name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" icon="kanban-stop" />
339 <a name="case_pending" string="Pending" states="draft,open" type="object" icon="kanban-pause" />
340 <a name="case_open" string="Open" states="pending" type="object" icon="gtk-media-play" />
341 <a name="case_mark_won" string="Mark Won" states="open,pending" type="object" icon="kanban-apply" />
350 <!-- CRM Lead Search View -->
351 <record id="view_crm_case_leads_filter" model="ir.ui.view">
352 <field name="name">CRM - Leads Search</field>
353 <field name="model">crm.lead</field>
354 <field name="type">search</field>
355 <field name="arch" type="xml">
356 <search string="Search Leads">
357 <filter icon="terp-mail-message-new"
358 string="Inbox" help="Unread messages"
359 name="needaction_pending"
360 domain="[('needaction_pending','=',True)]"/>
361 <field name="name" string="Lead / Customer" filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
362 <!-- subjects is not set as store=True so, it is placed outside filter_domain-->
363 <field name="subjects"/>
364 <separator orientation="vertical"/>
365 <field name="create_date"/>
366 <separator orientation="vertical"/>
367 <filter icon="terp-check"
369 name="new" help="New Leads"
370 domain="[('state','=','draft')]"/>
371 <filter icon="terp-camera_test"
374 domain="[('state','=','open')]"/>
375 <filter string="Unassigned Leads"
376 icon="terp-personal-"
377 domain="[('user_id','=', False)]"
378 help="Unassigned Leads" />
379 <filter string="Leads Assigned to Me or My Team(s)"
380 icon="terp-personal+"
381 context="{'invisible_section': False}"
382 domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
383 help="Leads that are assigned to one of the sale teams I manage, or to me"/>
384 <separator orientation="vertical"/>
385 <field name="user_id"/>
386 <field name="section_id" widget="selection"
387 context="{'invisible_section': False}"/>
388 <field name="country_id" context="{'invisible_country': False}"/>
389 <separator orientation="vertical"/>
391 <group expand="0" string="Group By...">
392 <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
393 <filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
394 <filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
395 <separator orientation="vertical"/>
396 <filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}"/>
397 <filter string="Campaign" icon="terp-gtk-jump-to-rtl"
398 domain="[]" context="{'group_by':'type_id'}" />
399 <filter string="Channel" icon="terp-call-start"
400 domain="[]" context="{'group_by':'channel_id'}" />
401 <separator orientation="vertical"/>
402 <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
403 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
404 <separator orientation="vertical" groups="base.group_no_one"/>
405 <filter string="Creation" help="Create date" icon="terp-go-month"
406 domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
408 <separator orientation="vertical"/>
409 <group string="Display">
410 <filter string="Show Countries" icon="terp-personal+" context="{'invisible_country': False}" help="Show Countries"/>
411 <filter string="Show Sales Team"
412 icon="terp-personal+"
413 context="{'invisible_section': False}"
415 help="Show Sales Team"/>
426 <!-- Opportunities Form View -->
427 <record model="ir.ui.view" id="crm_case_form_view_oppor">
428 <field name="name">Opportunities</field>
429 <field name="model">crm.lead</field>
430 <field name="type">form</field>
431 <field name="priority">20</field>
432 <field name="arch" type="xml">
433 <form string="Opportunities" version="7.0">
435 <button name="stage_previous" string="Previous" type="object"
436 states="open" icon="gtk-go-back" context="{'stage_type': 'opportunity'}"/>
437 <button name="stage_next" string="Next" type="object"
438 states="open" icon="gtk-go-forward" context="{'stage_type': 'opportunity'}"/>
439 <button name="case_mark_won" string="Mark Won" type="object"
440 states="open" class="oe_highlight"/>
441 <button name="case_mark_won" string="Mark Won" type="object"
442 states="draft,pending"/>
443 <button name="case_open" string="Open" type="object" class="oe_highlight"
444 states="draft,pending"/>
445 <button name="case_escalate" string="Escalate" type="object"
447 <button name="case_mark_lost" string="Mark Lost" type="object"
448 states="draft,open"/>
449 <button name="case_reset" string="Reset to Draft" type="object"
450 states="done,cancel" />
451 <button name="case_cancel" string="Cancel" type="object"
453 <field name="stage_id" widget="statusbar"
454 on_change="onchange_stage_id(stage_id)"/>
457 <div class="oe_right oe_button_box">
458 <button string="Schedule/Log Call"
459 name="%(opportunity2phonecall_act)d"
461 <button string="Schedule Meeting"
462 name="action_makeMeeting"
465 <div class="oe_title">
466 <label for="name" class="oe_edit_only"/>
467 <h1><field name="name"/></h1>
468 <label for="planned_revenue" class="oe_edit_only"/>
470 <field name="planned_revenue" class="oe_inline"/>
471 <field name="company_currency" class="oe_inline"/> at
472 <field name="probability" class="oe_inline"/>%% success rate
477 <field name="partner_id"
478 on_change="onchange_partner_id(partner_id, email_from)"
480 context="{'default_name': partner_name, 'default_email': email_from, 'default_phone': phone}"/>
481 <field name="email_from" string="Email"/>
482 <field name="phone"/>
486 <label for="title_action"/>
488 <field name="date_action" nolabel="1"/> -
489 <field name="title_action" class="oe_inline" nolabel="1" placeholder="Call for proposal"/>
491 <field name="date_deadline"/>
492 <field name="priority"/>
496 <field name="user_id"/>
497 <field name="section_id" colspan="1" widget="selection"/>
500 <field name="categ_id"
501 string="Category" widget="selection"
502 domain="[('object_id.model', '=', 'crm.lead')]" />
507 <!--<button string="Mail"
508 name="%(mail.action_email_compose_message_wizard)d"
509 context="{'mail':'new', 'model': 'crm.lead'}"
510 icon="terp-mail-message-new" type="action" />-->
512 <notebook colspan="4">
513 <page string="Internal Notes">
514 <field name="description"/>
519 <field name="partner_name"/>
520 <label for="street" string="Address"/>
522 <field name="street" placeholder="Street..."/>
523 <field name="street2"/>
524 <div class="address_format">
525 <field name="city" placeholder="City" style="width: 40%%"/>
526 <field name="state_id" class="oe_no_button" placeholder="State" style="width: 24%%"/>
527 <field name="zip" placeholder="ZIP" style="width: 34%%"/>
529 <field name="country_id" placeholder="Country"/>
534 <label for="contact_name" />
536 <field name="contact_name" class="oe_inline"/>
537 <field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" class="oe_inline oe_no_button"/>
539 <field name="function" />
540 <field name="mobile"/>
544 <group string="Categorization">
545 <field name="type_id" widget="selection"/>
546 <field name="channel_id" widget="selection"/>
548 <group string="Mailings">
549 <field name="opt_in" on_change="on_change_opt_in(opt_in)"/>
550 <field name="opt_out" on_change="on_change_opt_out(opt_out)"/>
552 <group string="Misc">
553 <field name="active"/>
554 <field name="day_open" groups="base.group_no_one"/>
555 <field name="day_close" groups="base.group_no_one"/>
556 <field name="referred"/>
557 <field name="state" groups="base.group_no_one"/>
558 <field name="type" invisible="1"/>
560 <group string="References">
568 <div class="oe_chatter">
569 <field name="message_ids" widget="mail_thread"/>
575 <!-- Opportunities Tree View -->
576 <record model="ir.ui.view" id="crm_case_tree_view_oppor">
577 <field name="name">Opportunities Tree</field>
578 <field name="model">crm.lead</field>
579 <field name="type">tree</field>
580 <field name="arch" type="xml">
581 <tree string="Opportunities" fonts="bold:needaction_pending==True" colors="gray:state in ('cancel', 'done');red:date_deadline and (date_deadline < current_date)">
582 <field name="date_deadline" invisible="1"/>
583 <field name="create_date" groups="base.group_no_one"/>
584 <field name="name" string="Opportunity"/>
585 <field name="partner_id" string="Customer"/>
586 <field name="country_id" invisible="context.get('invisible_country', True)" />
587 <field name="date_action"/>
588 <field name="title_action" />
589 <field name="channel_id" invisible="1"/>
590 <field name="type_id" invisible="1"/>
591 <field name="subjects" invisible="1"/>
592 <field name="stage_id"/>
593 <field name="planned_revenue" sum="Expected Revenues"/>
594 <field name="probability" widget="progressbar" avg="Avg. of Probability"/>
595 <field name="section_id" invisible="context.get('invisible_section', True)" />
596 <field name="user_id"/>
597 <field name="priority" invisible="1"/>
598 <field name="categ_id" invisible="1"/>
599 <field name="state" groups="base.group_no_one"/>
600 <field name="needaction_pending" invisible="1"/>
606 <!-- Opportunities Search View -->
607 <record id="view_crm_case_opportunities_filter" model="ir.ui.view">
608 <field name="name">CRM - Opportunities Search</field>
609 <field name="model">crm.lead</field>
610 <field name="type">search</field>
611 <field name="arch" type="xml">
612 <search string="Search Opportunities">
613 <filter icon="terp-mail-message-new"
614 string="Inbox" help="Unread messages"
615 name="needaction_pending"
616 domain="[('needaction_pending','=',True)]"/>
617 <field name="name" string="Opportunity / Customer"
618 filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
619 <separator orientation="vertical"/>
620 <filter icon="terp-check"
621 string="New" help="New Opportunities"
623 domain="[('state','=','draft')]"/>
624 <filter icon="terp-camera_test"
625 string="Open" help="Open Opportunities"
627 domain="[('state','=','open')]"/>
628 <filter string="Unassigned Opportunities"
629 icon="terp-personal-"
630 domain="[('user_id','=', False)]"
631 help="Unassigned Opportunities" />
632 <filter string="Opportunities Assigned to Me or My Team(s)" icon="terp-personal+"
633 domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
634 context="{'invisible_section': False}"
635 help="Opportunities that are assigned to either me or one of the sale teams I manage" />
636 <separator orientation="vertical"/>
637 <field name="user_id"/>
638 <field name="country_id"/>
639 <field name="partner_id"/>
640 <field name="section_id"
641 context="{'invisible_section': False, 'default_section_id': self}"/>
643 <group expand="0" string="Group By..." colspan="16">
644 <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
645 <filter string="Team" help="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
646 <filter string="Customer" help="Partner" icon="terp-personal+" domain="[]" context="{'group_by':'partner_id'}"/>
647 <separator orientation="vertical" />
648 <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" />
649 <filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
650 <filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}" />
651 <filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}"/>
652 <filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
653 <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
654 <separator orientation="vertical" />
655 <filter string="Creation" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
656 <filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}" />
658 <group string="Display">
659 <filter string="Show Sales Team"
660 icon="terp-personal+"
661 context="{'invisible_section': False}"
663 help="Show Sales Team"/>
669 <!-- crm.lead Opportunities Graph View -->
670 <record model="ir.ui.view" id="crm_case_graph_view_opportunity">
671 <field name="name">CRM - Opportunity Graph</field>
672 <field name="model">crm.lead</field>
673 <field name="type">graph</field>
674 <field name="arch" type="xml">
675 <graph string="Opportunity by Categories" type="bar" orientation="horizontal">
676 <field name="categ_id"/>
677 <field name="planned_revenue" operator="+"/>
678 <field name="state" group="True"/>