<!-- Read/Unread actions -->
<record id="actions_server_crm_lead_unread" model="ir.actions.server">
- <field name="name">Mark unread</field>
+ <field name="name">CRM Lead: Mark unread</field>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="state">code</field>
- <field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
+ <field name="code">self.message_mark_as_unread(cr, uid, context.get('active_ids'), context=context)</field>
</record>
<record id="action_crm_lead_unread" model="ir.values">
<field name="name">action_crm_lead_unread</field>
<field name="action_id" ref="actions_server_crm_lead_unread"/>
- <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_unread'))" />
+ <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_unread'))"/>
<field name="key">action</field>
- <field name="model_id" ref="model_crm_lead" />
+ <field name="model_id" ref="model_crm_lead"/>
<field name="model">crm.lead</field>
<field name="key2">client_action_multi</field>
</record>
<record id="actions_server_crm_lead_read" model="ir.actions.server">
- <field name="name">Mark read</field>
+ <field name="name">CRM Lead: Mark read</field>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="state">code</field>
- <field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
+ <field name="code">self.message_mark_as_read(cr, uid, context.get('active_ids'), context=context)</field>
</record>
<record id="action_crm_lead_read" model="ir.values">
<field name="name">action_crm_lead_read</field>
<field name="action_id" ref="actions_server_crm_lead_read"/>
- <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_read'))" />
+ <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_read'))"/>
<field name="key">action</field>
- <field name="model_id" ref="model_crm_lead" />
+ <field name="model_id" ref="model_crm_lead"/>
<field name="model">crm.lead</field>
<field name="key2">client_action_multi</field>
</record>
<header>
<button name="%(crm.action_crm_lead2opportunity_partner)d" string="Convert to Opportunity" type="action"
states="draft,open,pending" help="Convert to Opportunity" class="oe_highlight"/>
- <button name="case_escalate" string="Escalate" type="object"
- states="draft,open,pending"/>
<button name="case_reset" string="Reset" type="object"
states="cancel"/>
<button name="case_cancel" string="Cancel" type="object"
<div class="oe_right oe_button_box" name="buttons">
<button type="action"
name="%(act_crm_opportunity_crm_phonecall_new)d"
- string="Phone Calls" />
+ string="Phone Calls"/>
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Lead Description"/>
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
- <field name="state_id" options='{"no_open": true}' placeholder="State" style="width: 24%%"/>
+ <field name="state_id" on_change="onchange_state(state_id)" options='{"no_open": True}' placeholder="State" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
- <field name="country_id" placeholder="Country" options='{"no_open": true}'/>
+ <field name="country_id" placeholder="Country" options='{"no_open": True}'/>
</div>
</group>
<group>
- <label for="contact_name" />
+ <label for="contact_name"/>
<div>
<field name="contact_name" class="oe_inline"/>,
- <field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" class="oe_inline" options='{"no_open": true}'/>
+ <field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" class="oe_inline" options='{"no_open": True}'/>
</div>
<field name="email_from" widget="email"/>
- <field name="function" />
+ <field name="function"/>
<field name="phone"/>
<field name="mobile"/>
<field name="fax"/>
</group>
<group>
<field name="user_id"/>
- <field name="section_id"/>
+ <label for="section_id"/>
+ <div>
+ <field name="section_id"/>
+ <button name="case_escalate" string="Escalate" type="object" states="draft,open,pending"/>
+ </div>
<field name="type" invisible="1"/>
</group>
<group>
<group string="Categorization">
<field name="company_id"
groups="base.group_multi_company"
- widget="selection" colspan="2" />
- <field name="type_id" widget="selection"/>
+ widget="selection" colspan="2"/>
+ <field name="type_id"/>
<field name="channel_id" widget="selection"/>
<field name="referred"/>
<field name="state" groups="base.group_no_one"/>
</group>
<group string="Mailings">
- <field name="opt_out" />
+ <field name="opt_out"/>
</group>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
<field name="name">Leads</field>
<field name="model">crm.lead</field>
<field name="arch" type="xml">
- <tree string="Leads" fonts="bold:needaction_pending==True" colors="grey:state in ('cancel', 'done')">
+ <tree string="Leads" fonts="bold:message_unread==True" colors="grey:state in ('cancel', 'done')">
<field name="date_deadline" invisible="1"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="name"/>
<field name="contact_name"/>
- <field name="country_id" invisible="context.get('invisible_country', True)" />
+ <field name="country_id" invisible="context.get('invisible_country', True)"/>
<field name="email_from"/>
<field name="phone"/>
<field name="stage_id"/>
<field name="user_id" invisible="1"/>
- <field name="section_id" invisible="context.get('invisible_section', True)" />
- <field name="state" groups="base.group_no_one"/>
+ <field name="section_id" invisible="context.get('invisible_section', True)"/>
+ <field name="state" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="referred" invisible="1"/>
<field name="channel_id" invisible="1"/>
- <field name="subjects" invisible="1"/>
- <field name="needaction_pending" invisible="1"/>
+ <field name="message_unread" invisible="1"/>
</tree>
</field>
</record>
<field name="arch" type="xml">
<calendar string="Leads Generation"
date_start="date_action" color="user_id">
- <field name="name" />
- <field name="partner_name" />
+ <field name="name"/>
+ <field name="partner_name"/>
</calendar>
</field>
</record>
<field name="user_id"/>
<field name="partner_address_email"/>
<field name="message_summary"/>
- <field name="needaction_pending"/>
+ <field name="message_unread"/>
<templates>
- <t t-name="lead_details">
- <ul class="oe_kanban_tooltip">
- <li t-if="record.phone.raw_value"><b>Phone:</b> <field name="phone"/></li>
- <li><b>Probability:</b> <field name="probability"/>%%</li>
- <li><b>Creation date:</b> <field name="create_date"/></li>
- <li t-if="record.date_deadline.raw_value"><b>Date Deadline:</b> <field name="date_deadline"/></li>
- </ul>
- </t>
+ <field name="date_deadline"/>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
<div class="oe_dropdown_toggle oe_dropdown_kanban">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
- <t t-if="widget.view._is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
- <t t-if="widget.view._is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
+ <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
+ <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
<li><a name="%(mail.action_email_compose_message_wizard)d" type="action">Send Email</a></li>
<li><a name="%(opportunity2phonecall_act)d" type="action">Log Call</a></li>
<li><a name="action_makeMeeting" type="object">Schedule Meeting</a></li>
<div>
<b><field name="name"/></b>
<t t-if="record.planned_revenue.raw_value">
- - <b><t t-esc="Math.round(record.planned_revenue.value)"/>
+ - <b><t t-esc="record.planned_revenue.value"/>
<field name="company_currency"/></b>
</t>
</div>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
<div class="oe_kanban_footer_left">
- <t t-if="record.needaction_pending.raw_value"><span class="oe_kanban_mail_new">New</span></t>
<t t-raw="record.message_summary.raw_value"/>
</div>
</div>
<field name="arch" type="xml">
<search string="Search Leads">
<field name="name" string="Lead / Customer" filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
- <field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike',self)]" />
- <!-- subjects is not set as store=True so, it is placed outside filter_domain-->
- <field name="subjects"/>
+ <field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike',self)]"/>
<field name="create_date"/>
- <filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
+ <filter icon="terp-mail-message-new" string="Unread Messages" help="Unread messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
<filter icon="terp-check" string="New" name="new" help="New Leads" domain="[('state','=','draft')]"/>
- <filter icon="terp-camera_test" string="Open" name="open" domain="[('state','=','open')]"/>
+ <filter icon="terp-camera_test" string="In Progress" name="open" domain="[('state','=','open')]"/>
<separator/>
- <filter string="Unassigned Leads" icon="terp-personal-" domain="[('user_id','=', False)]" help="Unassigned Leads" />
+ <filter string="Unassigned Leads" icon="terp-personal-" domain="[('user_id','=', False)]" help="Unassigned Leads"/>
<separator/>
<filter string="Leads Assigned to Me or My Team(s)" icon="terp-personal+" context="{'invisible_section': False}"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
<filter string="Referrer" icon="terp-personal" domain="[]" context="{'group_by':'referred'}"/>
- <filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}" />
- <filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
+ <filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}"/>
+ <filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}"/>
<separator orientation="vertical"/>
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
- <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Creation" help="Create date" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
</group>
<group string="Display">
states="draft,open,pending" class="oe_highlight"/>
<button name="case_mark_lost" string="Mark Lost" type="object"
states="draft,open" class="oe_highlight"/>
- <button name="case_escalate" string="Escalate" type="object"
- states="open" />
<field name="stage_id" widget="statusbar" clickable="True"/>
</header>
<sheet>
name="action_makeMeeting"
type="object"
context="{'search_default_attendee_id': active_id, 'default_attendee_id' : active_id}"
- />
+ />
</div>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1><field name="name"/></h1>
<label for="planned_revenue" class="oe_edit_only"/>
<h2>
- <field name="planned_revenue" class="oe_inline"/>
- <field name="company_currency" class="oe_inline"/> at
- <field name="probability" class="oe_inline" widget="integer"/>%% success rate
+ <field name="company_currency" invisible="1"/>
+ <field name="planned_revenue" class="oe_inline" widget='monetary' options="{'currency_field': 'company_currency'}"/>
+ <span class="oe_grey"> at </span>
+ <field name="probability" class="oe_inline" widget="integer"/>%%
</h2>
</div>
<group>
<group>
<field name="user_id"/>
- <field name="section_id" colspan="1" widget="selection"/>
+ <label for="section_id"/>
+ <div>
+ <field name="section_id" widget="selection"/>
+ <button name="case_escalate" string="Escalate" type="object" class="oe_link"
+ attrs="{'invisible': [('section_id', '=', False)]}"/>
+ </div>
</group>
<group>
<field name="categ_ids"
<field name="street2"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%"/>
- <field name="state_id" options='{"no_open": true}' placeholder="State" style="width: 24%%"/>
+ <field name="state_id" options='{"no_open": True}' on_change="onchange_state(state_id)" placeholder="State" style="width: 24%%"/>
<field name="zip" placeholder="ZIP" style="width: 34%%"/>
</div>
- <field name="country_id" placeholder="Country" options='{"no_open": true}'/>
+ <field name="country_id" placeholder="Country" options='{"no_open": True}'/>
</div>
</group>
<group>
- <label for="contact_name" />
+ <label for="contact_name"/>
<div>
<field name="contact_name" class="oe_inline"/>
- <field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" options='{"no_open": true}' class="oe_inline"/>
+ <field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" options='{"no_open": True}' class="oe_inline"/>
</div>
- <field name="function" />
+ <field name="function"/>
<field name="mobile"/>
<field name="fax"/>
</group>
<group string="Categorization">
- <field name="type_id" widget="selection"/>
+ <field name="type_id" />
<field name="channel_id" widget="selection"/>
</group>
<group string="Mailings">
- <field name="opt_out" />
+ <field name="opt_out"/>
</group>
<group string="Misc">
<field name="active"/>
<field name="day_open" groups="base.group_no_one"/>
<field name="day_close" groups="base.group_no_one"/>
<field name="referred"/>
- <field name="state" groups="base.group_no_one"/>
+ <field name="state" invisible="1"/>
<field name="type" invisible="1"/>
</group>
<group string="References">
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
+ <field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
<field name="name">Opportunities Tree</field>
<field name="model">crm.lead</field>
<field name="arch" type="xml">
- <tree string="Opportunities" fonts="bold:needaction_pending==True" colors="gray:state in ('cancel', 'done');red:date_deadline and (date_deadline < current_date)">
+ <tree string="Opportunities" fonts="bold:message_unread==True" colors="gray:state in ('cancel', 'done');red:date_deadline and (date_deadline < current_date)">
<field name="date_deadline" invisible="1"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="name" string="Opportunity"/>
<field name="partner_id" string="Customer"/>
- <field name="country_id" invisible="context.get('invisible_country', True)" />
+ <field name="country_id" invisible="context.get('invisible_country', True)"/>
<field name="date_action"/>
- <field name="title_action" />
+ <field name="title_action"/>
<field name="channel_id" invisible="1"/>
<field name="type_id" invisible="1"/>
- <field name="subjects" invisible="1"/>
<field name="stage_id"/>
<field name="planned_revenue" sum="Expected Revenues"/>
<field name="probability" widget="progressbar" avg="Avg. of Probability"/>
- <field name="section_id" invisible="context.get('invisible_section', True)" />
+ <field name="section_id" invisible="context.get('invisible_section', True)"/>
<field name="user_id"/>
<field name="priority" invisible="1"/>
<field name="state" groups="base.group_no_one"/>
- <field name="needaction_pending" invisible="1"/>
+ <field name="message_unread" invisible="1"/>
</tree>
</field>
</record>
<search string="Search Opportunities">
<field name="name" string="Opportunity / Customer"
filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
- <field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike', self)]" />
- <filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="needaction_pending" domain="[('needaction_pending','=',True)]"/>
+ <field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike', self)]"/>
+ <filter icon="terp-mail-message-new" string="Unread Messages" help="Unread messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/>
<filter icon="terp-check" string="New" help="New Opportunities" name="new" domain="[('state','=','draft')]"/>
- <filter icon="terp-camera_test" string="Open" help="Open Opportunities" name="open" domain="[('state','=','open')]"/>
+ <filter icon="terp-camera_test" string="In Progress" help="Open Opportunities" name="open" domain="[('state','=','open')]"/>
<separator/>
- <filter string="Unassigned Opportunities" icon="terp-personal-" domain="[('user_id','=', False)]" help="Unassigned Opportunities" />
+ <filter string="Unassigned Opportunities" icon="terp-personal-" domain="[('user_id','=', False)]" help="Unassigned Opportunities"/>
<separator/>
<filter string="Opportunities Assigned to Me or My Team(s)" icon="terp-personal+"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]" context="{'invisible_section': False}"
- help="Opportunities that are assigned to either me or one of the sale teams I manage" />
+ help="Opportunities that are assigned to either me or one of the sale teams I manage"/>
<field name="user_id"/>
- <field name="country_id"/>
- <field name="partner_id"/>
<field name="section_id" context="{'invisible_section': False, 'default_section_id': self}"/>
+ <field name="partner_id"/>
<group expand="0" string="Group By..." colspan="16">
- <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
+ <filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Team" help="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
<filter string="Customer" help="Partner" icon="terp-personal+" domain="[]" context="{'group_by':'partner_id'}"/>
- <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" />
- <filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
+ <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
+ <filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}"/>
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}"/>
- <filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
- <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+ <filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}"/>
<filter string="Creation" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/>
- <filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}" />
+ <filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}"/>
</group>
<group string="Display">
<filter string="Show Sales Team" icon="terp-personal+" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>