[IMP] crm, sales_team : usability onboarding. Improvements in kanban and form views mainly.
This commit is contained in:
+12
-2
@@ -202,6 +202,15 @@ class crm_lead(format_address, osv.osv):
|
||||
opp_id: Event.search_count(cr,uid, [('opportunity_id', '=', opp_id)], context=context)
|
||||
for opp_id in ids
|
||||
}
|
||||
|
||||
def _calls_count(self, cr, uid, ids, field_name, args, context=None):
|
||||
res = dict.fromkeys(ids, 0)
|
||||
phonecall_data = self.pool['crm.phonecall'].read_group(
|
||||
cr, uid, [('opportunity_id', 'in', ids)], ['opportunity_id'], ['opportunity_id'], context=context)
|
||||
for data in phonecall_data:
|
||||
res[data['opportunity_id'][0]] = data['opportunity_id_count']
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'partner_id': fields.many2one('res.partner', 'Partner', ondelete='set null', track_visibility='onchange',
|
||||
select=True, help="Linked partner (optional). Usually created when converting the lead."),
|
||||
@@ -242,7 +251,7 @@ class crm_lead(format_address, osv.osv):
|
||||
'date_conversion': fields.datetime('Conversion Date', readonly=1),
|
||||
|
||||
# Messaging and marketing
|
||||
'message_bounce': fields.integer('Bounce'),
|
||||
'message_bounce': fields.integer('Bounce', help="Counter of the number of bounced emails for this contact"),
|
||||
# Only used for type opportunity
|
||||
'probability': fields.float('Probability', group_operator="avg"),
|
||||
'planned_revenue': fields.float('Expected Revenue', track_visibility='always'),
|
||||
@@ -274,7 +283,8 @@ class crm_lead(format_address, osv.osv):
|
||||
'company_id': fields.many2one('res.company', 'Company', select=1),
|
||||
'planned_cost': fields.float('Planned Costs'),
|
||||
'meeting_count': fields.function(_meeting_count, string='# Meetings', type='integer'),
|
||||
'lost_reason': fields.many2one('crm.lost.reason', 'Lost Reason', select=True, track_visibility='onchange')
|
||||
'lost_reason': fields.many2one('crm.lost.reason', 'Lost Reason', select=True, track_visibility='onchange'),
|
||||
'calls_count': fields.function(_calls_count, string='# Phonecalls', type='integer'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
context="{'default_opportunity_id': active_id, 'search_default_opportunity_id': active_id, 'default_partner_id': partner_id, 'default_duration': 1.0}"
|
||||
name="%(crm.crm_phonecall_category_phone_incoming0)d" icon="fa-phone">
|
||||
<div>Calls</div>
|
||||
<field string="Calls" name="calls_count" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
@@ -176,8 +176,8 @@
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="priority" widget="priority"/>
|
||||
<field name="tag_ids" widget="many2many_tags"/>
|
||||
<field name="priority" widget="priority"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
@@ -186,7 +186,11 @@
|
||||
</page>
|
||||
<page string="Extra Info">
|
||||
<group>
|
||||
<group name="categorization" string="Marketing" >
|
||||
<group string="Mailings">
|
||||
<field name="opt_out"/>
|
||||
<field name="message_bounce"/>
|
||||
</group>
|
||||
<group string="Categorization" groups="base.group_multi_company,base.group_no_one" name="categorization">
|
||||
<field name="company_id"
|
||||
groups="base.group_multi_company"
|
||||
options="{'no_create': True}"/>
|
||||
@@ -194,10 +198,6 @@
|
||||
<field name="medium_id"/>
|
||||
<field name="source_id" />
|
||||
</group>
|
||||
<group string="Mailings">
|
||||
<field name="opt_out"/>
|
||||
<field name="message_bounce"/>
|
||||
</group>
|
||||
<group string="Misc">
|
||||
<field name="probability" groups="base.group_no_one"/>
|
||||
<field name="active"/>
|
||||
@@ -373,7 +373,7 @@
|
||||
help="No salesperson"/>
|
||||
<filter string="To Process" name="to_process"
|
||||
domain="['|',('stage_id.probability','>', 0),('stage_id.fold','=', False)]"
|
||||
help="Not marked as Dead"/>
|
||||
help="Not marked as Dead"/>
|
||||
<separator />
|
||||
<filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/>
|
||||
<separator />
|
||||
@@ -419,7 +419,7 @@
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
name="%(crm.crm_phonecall_category_phone_incoming0)d" icon="fa-phone"
|
||||
context="{'default_opportunity_id': active_id, 'search_default_opportunity_id': active_id, 'default_partner_id': partner_id, 'default_duration': 1.0}">
|
||||
<div>Calls</div>
|
||||
<field string="Calls" name="calls_count" widget="statinfo"/>
|
||||
</button>
|
||||
<button class="oe_inline oe_stat_button" type="object"
|
||||
context="{'partner_id': partner_id}"
|
||||
|
||||
@@ -276,6 +276,7 @@ class crm_phonecall(osv.osv):
|
||||
'default_user_id': uid,
|
||||
'default_email_from': phonecall.email_from,
|
||||
'default_name': phonecall.name,
|
||||
'default_opportunity_id': phonecall.opportunity_id.id,
|
||||
}
|
||||
return res
|
||||
|
||||
|
||||
@@ -98,15 +98,19 @@
|
||||
<div class="oe_kanban_alias text-center" t-if="record.use_leads.raw_value and record.alias_name.value and record.alias_domain.value">
|
||||
<small><i class="fa fa-envelope-o"></i> <field name="alias_id"/></small>
|
||||
</div>
|
||||
<div class="row oe_salesteam_kanban_view oe_margin_top_8">
|
||||
<div class="col-md-6 row" t-if="record.use_leads.raw_value">
|
||||
</xpath>
|
||||
<xpath expr="//span[@name='oe_salesteam_separator']" position="before">
|
||||
<div class="col-md-6 oe_margin_top_4" t-if="record.use_leads.raw_value">
|
||||
<div class="row">
|
||||
<a class="col-md-9" name="%(crm_case_form_view_salesteams_lead)d" type="action">Leads</a>
|
||||
<a class="col-md-3" name="%(action_report_crm_lead_salesteam)d" type="action">
|
||||
<field name="monthly_open_leads" widget="sparkline_bar"
|
||||
options="{'height': '20px', 'barWidth': 4, 'barSpacing': 1, 'delayIn': '3000', 'tooltip_suffix': ' Leads'}">Open Leads per Month<br/>Click to see a detailed analysis of leads.</field>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-6 row" t-if="record.use_opportunities.raw_value">
|
||||
</div>
|
||||
<div class="col-md-6 oe_margin_top_4" t-if="record.use_opportunities.raw_value">
|
||||
<div class="row">
|
||||
<a class="col-md-9" name="%(crm_case_form_view_salesteams_opportunity)d" type="action">Opportunities</a>
|
||||
<a class="col-md-3" name="%(action_report_crm_opportunity_salesteam)d" type="action">
|
||||
<field name="monthly_planned_revenue" widget="sparkline_bar"
|
||||
@@ -128,22 +132,20 @@
|
||||
<field name="use_leads"/><label for="use_leads" string="Leads"/>
|
||||
<field name="use_opportunities" class="oe_inline"/><label for="use_opportunities"/>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='left']" position="after">
|
||||
<group>
|
||||
<label for="alias_name" string="Email Alias"
|
||||
attrs="{'invisible': [('alias_domain', '=', False)]}"/>
|
||||
<div name="alias_def"
|
||||
attrs="{'invisible': [('alias_domain', '=', False)]}">
|
||||
<field name="alias_id" class="oe_read_only oe_inline"
|
||||
string="Email Alias" required="0"/>
|
||||
<div class="oe_edit_only oe_inline" name="edit_alias" style="display: inline;" >
|
||||
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
|
||||
</div>
|
||||
<xpath expr="//field[@name='change_responsible']" position="after">
|
||||
<label for="alias_name" string="Email Alias"
|
||||
attrs="{'invisible': [('alias_domain', '=', False)]}"/>
|
||||
<div name="alias_def"
|
||||
attrs="{'invisible': [('alias_domain', '=', False)]}">
|
||||
<field name="alias_id" class="oe_read_only oe_inline"
|
||||
string="Email Alias" required="0"/>
|
||||
<div class="oe_edit_only oe_inline" name="edit_alias" style="display: inline;" >
|
||||
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
|
||||
</div>
|
||||
<field name="alias_contact" class="oe_inline"
|
||||
string="Accept Emails From"
|
||||
attrs="{'invisible': [('alias_domain', '=', False)]}"/>
|
||||
</group>
|
||||
</div>
|
||||
<field name="alias_contact" class="oe_inline"
|
||||
string="Accept Emails From"
|
||||
attrs="{'invisible': [('alias_domain', '=', False)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@string='Team Members']" position="after">
|
||||
<page string="Stages">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@charset "utf-8";
|
||||
.openerp .oe_margin_top_8 {
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
<field name="invoiced_forecast"/>
|
||||
<field name="invoiced_target"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@class='oe_clear']" position="before">
|
||||
<div class="row oe_salesteam_kanban_view">
|
||||
<div class="row col-md-6 oe_margin_top_4" t-if="record.use_quotations.raw_value">
|
||||
<xpath expr="//span[@name='oe_salesteam_separator']" position="after">
|
||||
<div class="col-md-6 oe_margin_top_4" t-if="record.use_quotations.raw_value">
|
||||
<div class="row">
|
||||
<a class="col-md-9" name="%(action_quotations_salesteams)d" type="action">Quotations</a>
|
||||
<a class="col-md-3" name="%(action_order_report_quotation_salesteam)d" type="action">
|
||||
<field name="monthly_quoted" widget="sparkline_bar" options="{'delayIn': '3000'}">
|
||||
@@ -42,7 +42,9 @@
|
||||
</field>
|
||||
</a>
|
||||
</div>
|
||||
<div class="row col-md-6 oe_margin_top_4">
|
||||
</div>
|
||||
<div class="col-md-6 oe_margin_top_4">
|
||||
<div class="row">
|
||||
<a class="col-md-9" name="%(action_orders_salesteams)d" type="action">Sales Orders</a>
|
||||
<a class="col-md-3" name="%(action_order_report_so_salesteam)d" type="action">
|
||||
<field name="monthly_confirmed" widget="sparkline_bar" options="{'delayIn': '3000'}">
|
||||
@@ -50,9 +52,9 @@
|
||||
</field>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row oe_salesteam_kanban_view">
|
||||
<div class="row col-md-6 oe_margin_top_4" groups="account.group_account_invoice">
|
||||
</div>
|
||||
<div class="col-md-6 oe_margin_top_4" groups="account.group_account_invoice">
|
||||
<div class="row">
|
||||
<a class="col-md-9" name="%(action_invoice_salesteams)d" type="action">Invoices</a>
|
||||
<a class="col-md-3" name="%(action_account_invoice_report_salesteam)d" type="action">
|
||||
<field name="monthly_invoiced" widget="sparkline_bar" options="{'delayIn': '3000'}">
|
||||
@@ -60,10 +62,10 @@
|
||||
</field>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[@class='oe_clear']" position="inside">
|
||||
<div class="row pull-right" t-if="record.invoiced_target.raw_value">
|
||||
<div class="oe_margin_top_8" t-if="record.invoiced_target.raw_value">
|
||||
<field name="monthly_invoiced" widget="gauge" style="width:160px; height: 120px; cursor: pointer;"
|
||||
options="{'max_field': 'invoiced_target'}">Invoiced</field>
|
||||
<field name="invoiced_forecast" widget="gauge" style="width:160px; height: 120px; cursor: pointer;"
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//field[@name='stage_id']" position="before">
|
||||
<button attrs="{'invisible': [('probability', '<', 100)]}" string="Create Quotation" name="%(action_crm_make_sale)d" type="action"/>
|
||||
<button attrs="{'invisible': [('probability', '=', 100)]}" string="Convert to Quotation" name="%(action_crm_make_sale)d" type="action" class="oe_highlight"/>
|
||||
<button attrs="{'invisible': [('probability', '=', 0)]}" string="Convert to Quotation" name="%(action_crm_make_sale)d" type="action" class="oe_highlight"/>
|
||||
<button attrs="{'invisible': [('probability', '>', 0)]}" string="Convert to Quotation" name="%(action_crm_make_sale)d" type="action"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button class="oe_inline oe_stat_button" type="action" name="%(sale_action_quotations)d" icon="stat_button_icon fa fa-usd">
|
||||
|
||||
@@ -102,7 +102,10 @@ class crm_make_sale(osv.osv_memory):
|
||||
'date_order': fields.date.context_today(self,cr,uid,context=context),
|
||||
'fiscal_position': fpos,
|
||||
'payment_term':payment_term,
|
||||
'opportunity_id': case.id
|
||||
'opportunity_id': case.id,
|
||||
'campaign_id': case.campaign_id and case.campaign_id.id or False,
|
||||
'medium_id': case.medium_id and case.medium_id.id or False,
|
||||
'source_id': case.source_id and case.source_id.id or False,
|
||||
}
|
||||
if partner.id:
|
||||
vals['user_id'] = partner.user_id and partner.user_id.id or uid
|
||||
|
||||
@@ -27,7 +27,7 @@ from openerp.osv import fields, osv
|
||||
class crm_team(osv.Model):
|
||||
_name = "crm.team"
|
||||
_inherit = ['mail.thread', 'ir.needaction_mixin']
|
||||
_description = "Sales Teams"
|
||||
_description = "Sales Team"
|
||||
_order = "complete_name"
|
||||
_period_number = 5
|
||||
|
||||
|
||||
@@ -30,10 +30,13 @@
|
||||
</div>
|
||||
<div class="oe_kanban_content">
|
||||
<h4 class="text-center" name="name"><strong><field name="name"/></strong></h4>
|
||||
<div class="oe_salesteam_kanban_view row oe_margin_top_16">
|
||||
<span name="oe_salesteam_separator"/>
|
||||
</div>
|
||||
<div class="oe_clear"></div>
|
||||
<div class="oe_kanban_salesteams_avatars">
|
||||
<t t-foreach="record.member_ids.raw_value.slice(0,10)" t-as="member">
|
||||
<img class="oe_margin_top_16 img-rounded" t-att-src="kanban_image('res.users', 'image_small', member)" t-att-data-member_id="member"/>
|
||||
<img class="img-rounded oe_kanban_avatar_smallbox" t-att-src="kanban_image('res.users', 'image_small', member)" t-att-data-member_id="member"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
@@ -101,18 +104,33 @@
|
||||
<group>
|
||||
<group name="left">
|
||||
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
|
||||
<field name="code"/>
|
||||
<field name="code" groups="base.group_no_one"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group name="right">
|
||||
<field name="parent_id"/>
|
||||
<field name="change_responsible"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Team Members">
|
||||
<field name="member_ids">
|
||||
<tree>
|
||||
<field name="member_ids" widget="many2many_kanban">
|
||||
<kanban quick_create="false" create="true" delete="true">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div>
|
||||
<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
|
||||
<div class="oe_module_vignette">
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', record.id.value)" class="oe_avatar oe_kanban_avatar_smallbox"/>
|
||||
<div class="oe_module_desc">
|
||||
<field name="name"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
|
||||
@@ -2,15 +2,10 @@
|
||||
.openerp .oe_kanban_view .oe_kanban_crm_salesteams {
|
||||
/* Customize width and height of kanban according bootstrap3 */
|
||||
width: 357px;
|
||||
min-height: 254px !important;
|
||||
/* End of customize */
|
||||
cursor: default;
|
||||
min-height: 80px !important;
|
||||
}
|
||||
.openerp .oe_kanban_view .oe_kanban_salesteams_avatars img {
|
||||
width: 30px;
|
||||
}
|
||||
.openerp .oe_salesteams_kanban_content {
|
||||
margin-right: 16px;
|
||||
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_kanban_content div:first-child {
|
||||
margin-right: 0px;
|
||||
}
|
||||
.openerp .oe_kanban_view .oe_deadline {
|
||||
padding-left: 0.5em;
|
||||
@@ -21,4 +16,4 @@
|
||||
}
|
||||
.openerp .oe_margin_top_16 {
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,16 +5,11 @@
|
||||
.oe_kanban_crm_salesteams
|
||||
/* Customize width and height of kanban according bootstrap3 */
|
||||
width: 357px
|
||||
min-height: 254px !important
|
||||
/* End of customize */
|
||||
cursor: default
|
||||
.oe_kanban_salesteams_avatars
|
||||
img
|
||||
width: 30px
|
||||
min-height: 80px !important
|
||||
.oe_kanban_content div:first-child
|
||||
margin-right: 0px
|
||||
.oe_deadline
|
||||
padding-left: 0.5em
|
||||
.oe_salesteams_kanban_content
|
||||
margin-right: 16px
|
||||
.oe_salesteam_kanban_view
|
||||
margin-left: 0px
|
||||
margin-right: -2px
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<form string="Scores">
|
||||
<sheet>
|
||||
<div class="oe_right oe_button_box" name="buttons">
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
name="%(score_leads)d" icon="fa-tags"
|
||||
>
|
||||
<field string="Leads" name="leads_count" widget="statinfo"/>
|
||||
@@ -114,7 +114,7 @@
|
||||
<!-- Score Menu Item -->
|
||||
<menuitem id="scores_menu" name="Scoring Rules" parent="leads_menu" action="score_action" />
|
||||
|
||||
<!--
|
||||
<!--
|
||||
TEAM USER
|
||||
-->
|
||||
<!-- Team User From View -->
|
||||
@@ -182,7 +182,7 @@
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#3faf3f), to(#1a721a));">
|
||||
<span class="fa fa-check"/>
|
||||
</button>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="record.running.raw_value === false">
|
||||
<button name="toggle_active" type="object" style="
|
||||
color: #eeeeee;
|
||||
@@ -194,7 +194,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<td>
|
||||
<div class="oe_kanban_details">
|
||||
<table>
|
||||
<tr>
|
||||
@@ -206,19 +206,18 @@
|
||||
<li><a type="open">
|
||||
<field name="team_id"/>
|
||||
</a></li>
|
||||
<li><field name="team_user_domain" widget='filters'/></li>
|
||||
</ul>
|
||||
</td>
|
||||
</td>
|
||||
<td>
|
||||
<field name="maximum_user_leads" invisible="1"/>
|
||||
<field name="leads_count" widget="gauge"
|
||||
<field name="leads_count" widget="gauge"
|
||||
style="width:108px; height: 81px; cursor: pointer;"
|
||||
options="{'max_field': 'maximum_user_leads'}"/>
|
||||
</td>
|
||||
options="{'max_field': 'maximum_user_leads'}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
@@ -238,7 +237,7 @@
|
||||
Click to create a salesmen.
|
||||
</p>
|
||||
<p>
|
||||
Link users to salesteam, set a per 30 days lead capacity for each of them and set filters to auto assign your leads.
|
||||
Link users to salesteam, set a per 30 days lead capacity for each of them and set filters to auto assign your leads.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
@@ -256,7 +255,7 @@
|
||||
</record>
|
||||
|
||||
<!-- Team User Menu Item -->
|
||||
<menuitem id="team" name="Teams Assignation" parent="leads_menu" action="team_action" />
|
||||
<menuitem id="team" name="Teams Assignation" parent="leads_menu" action="team_action" />
|
||||
|
||||
|
||||
<!-- LEAD DRY RUN -->
|
||||
@@ -302,7 +301,7 @@
|
||||
</record>
|
||||
|
||||
<!-- Team User Menu Item -->
|
||||
<menuitem id="leads_dry_run" name="Assignation dry run" parent="leads_menu" action="lead_dry_run_action" groups="base.group_no_one"/>
|
||||
<menuitem id="leads_dry_run" name="Assignation dry run" parent="leads_menu" action="lead_dry_run_action" groups="base.group_no_one"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<data>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
LEADS
|
||||
-->
|
||||
<!-- Crm Lead Search Filter - Language added -->
|
||||
@@ -43,7 +43,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<!-- <xpath expr="//button[@class='oe_inline oe_stat_button']" position="after"> -->
|
||||
<xpath expr="//div[@name='buttons']" position="inside">
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
name="%(website_crm_score_pageviews)d" icon="fa-tags"
|
||||
context="{'search_default_lead_id': active_id, 'default_lead_id': active_id}">
|
||||
<field string="Page views" name="pageviews_count" widget="statinfo"/>
|
||||
@@ -114,23 +114,16 @@
|
||||
<field name="team_user_ids"/>
|
||||
</field>
|
||||
<xpath expr="//div[@class='oe_clear']" position="after">
|
||||
<div class="oe_items_list">
|
||||
<div>
|
||||
Capacity: <b><field name="capacity"/></b>
|
||||
</div>
|
||||
<div>
|
||||
Lead count: <b><field name="leads_count"/></b>
|
||||
</div>
|
||||
<div></div>
|
||||
<div>
|
||||
Assigned: <b><field name="assigned_leads"/></b>
|
||||
</div>
|
||||
<div class="text-center text-muted">
|
||||
Capacity: <b><field name="capacity"/></b> |
|
||||
Lead count: <b><field name="leads_count"/></b> |
|
||||
Assigned: <b><field name="assigned_leads"/></b>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<xpath expr="//div[@class='oe_kanban_salesteams_avatars']" position="replace">
|
||||
<t t-foreach="record.user_ids.raw_value" t-as="member">
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', member)" width="32" height="32" />
|
||||
<t t-foreach="record.user_ids.raw_value.slice(0,10)" t-as="member">
|
||||
<img t-att-src="kanban_image('res.users', 'image_small', member)" class="img-rounded oe_kanban_avatar_smallbox" />
|
||||
</t>
|
||||
</xpath>
|
||||
</data>
|
||||
@@ -183,39 +176,36 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@class='oe_title']" position="before">
|
||||
<div class="oe_right oe_button_box" name="buttons">
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
name="%(crm_score_views_action_graph)d" icon="fa-tags"
|
||||
context="{'search_default_team_id': active_id, 'search_default_unassigned': 1 }"
|
||||
context="{'search_default_team_id': active_id, 'search_default_unassigned': 1 }"
|
||||
>
|
||||
<field string="Unassigned leads" name="unassigned_leads" widget="statinfo"/>
|
||||
</button>
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
<button class="oe_inline oe_stat_button" type="action"
|
||||
name="%(crm_score_views_action_table)d" icon="fa-tags"
|
||||
context="{'search_default_team_id': active_id}"
|
||||
context="{'search_default_team_id': active_id}"
|
||||
>
|
||||
<field string="Opportunities" name="leads_count" widget="statinfo"/>
|
||||
</button>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='left']" position="after">
|
||||
<group name="right">
|
||||
<field name="score_team_domain" options="{'model': 'crm.lead'}"/>
|
||||
<label for="assigned_leads"/>
|
||||
<div>
|
||||
<field name="assigned_leads" class="oe_inline"/> /
|
||||
<field name="capacity" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="min_for_assign" class="oe_inline"/>
|
||||
<div>
|
||||
<br/>
|
||||
<button name="direct_assign_leads" type="object" string="Assign Now" class="oe_link"/>
|
||||
<span groups="base.group_no_one">
|
||||
<br/>
|
||||
<button name="dry_assign_leads" type="object" string="Dry Assign" class="oe_link"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</group>
|
||||
<xpath expr="//group[@name='right']" position="inside">
|
||||
<field name="score_team_domain" options="{'model': 'crm.lead'}"/>
|
||||
<label for="assigned_leads"/>
|
||||
<div>
|
||||
<field name="assigned_leads" class="oe_inline"/> /
|
||||
<field name="capacity" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="min_for_assign" class="oe_inline"/>
|
||||
<div>
|
||||
<br/>
|
||||
<button name="direct_assign_leads" type="object" string="Assign Now" class="oe_link"/>
|
||||
<span groups="base.group_no_one">
|
||||
<br/>
|
||||
<button name="dry_assign_leads" type="object" string="Dry Assign" class="oe_link"/>
|
||||
</span>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//page[@string='Team Members']" position="replace">
|
||||
<page string="Assignation">
|
||||
@@ -242,7 +232,7 @@
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#3faf3f), to(#1a721a));">
|
||||
<span class="fa fa-check"/>
|
||||
</button>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="record.running.raw_value === false">
|
||||
<button name="toggle_active" type="object" style="
|
||||
color: #eeeeee;
|
||||
@@ -254,7 +244,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<td>
|
||||
<div class="oe_kanban_details">
|
||||
<table>
|
||||
<tr>
|
||||
@@ -266,17 +256,17 @@
|
||||
<!-- <li><field name="team_user_domain" widget="smart_filters"/></li> -->
|
||||
<li><field name="team_user_domain" widget='filters'/></li>
|
||||
</ul>
|
||||
</td>
|
||||
</td>
|
||||
<td>
|
||||
<field name="maximum_user_leads" invisible="1"/>
|
||||
<field name="leads_count" widget="gauge"
|
||||
<field name="leads_count" widget="gauge"
|
||||
style="width:108px; height: 81px; cursor: pointer;"
|
||||
options="{'max_field': 'maximum_user_leads'}"/>
|
||||
</td>
|
||||
options="{'max_field': 'maximum_user_leads'}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
@@ -290,7 +280,7 @@
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<!--
|
||||
IR FILTER - NOT IN USE RIGHT NOW
|
||||
-->
|
||||
<!-- Ir Filters Search Filter - action_id added -->
|
||||
@@ -335,7 +325,7 @@
|
||||
<!-- Ir Filters Menu Item -->
|
||||
<!-- This menu item allows to see SpamIrFilters, /!\ the parent must be changed -->
|
||||
<!-- <menuitem id="spam_ir_filters" name="SpamIrFilters" parent="leads_menu" action="spam_ir_filters_action" /> -->
|
||||
|
||||
|
||||
<!-- The following enables the more action that creates the filter on the email address of the lead -->
|
||||
<record id="action_mark_as_spam" model="ir.actions.server">
|
||||
<field name="name">Mark As Spam</field>
|
||||
@@ -347,7 +337,7 @@
|
||||
for lead_id in context['active_ids']:
|
||||
mail = self.read(cr, uid, lead_id, fields=['email_from'], context=context)['email_from']
|
||||
vals = values.copy()
|
||||
# str() below changes the encoding of mail from unicode
|
||||
# str() below changes the encoding of mail from unicode
|
||||
vals['domain'] = [('email_from', '=', str(mail))]
|
||||
vals['name'] = 'spam-' + mail
|
||||
self.pool['ir.filters'].create_or_replace(cr, uid, vals, context=context)
|
||||
|
||||
@@ -4,7 +4,13 @@
|
||||
<data>
|
||||
<template id="assets_editor" name="website_crm_score assets" inherit_id="website.assets_editor">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/website_crm_score/static/src/js/set_score.js"></script>
|
||||
<script type="text/javascript" src="/website_crm_score/static/src/js/set_score.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="assets_backend" name="website_crm_score assets" inherit_id="web.assets_backend">
|
||||
<xpath expr="." position="inside">
|
||||
<script type="text/javascript" src="/website_crm_score/static/src/js/display_filters.js"></script>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user