'open_lead_per_duration': fields.function(_get_open_lead_per_duration, string='Open Leads per duration', type="string", readonly=True),
'won_opportunity_per_duration': fields.function(_get_won_opportunity_per_duration, string='Rate of opporunities whon per duration', type="string", readonly=True)
-
}
def _get_stage_common(self, cr, uid, context):
<div class="oe_items_list">
<div>
<a t-if="record.use_leads.raw_value" name="%(crm_case_form_view_salesteams_lead)d" type="action">Leads</a>
- <a name="%(crm_case_form_view_salesteams_lead)d" type="action" class="oe_sparkline_bar" title="Number of opening leads per duration.\n(last item is the most recent)"><t t-raw="record.open_lead_per_duration.raw_value"/></a>
+ <a name="%(action_report_crm_lead)d" type="action" class="oe_sparkline_bar" t-att-data-value="record.open_lead_per_duration.raw_value">Number of opening leads per duration.<br/>(last one is <t t-esc="record.target_duration_txt.raw_value"/>)</a>
</div>
<div>
<a name="%(crm_case_form_view_salesteams_opportunity)d" type="action">Opportunities</a>
- <a name="%(crm_case_form_view_salesteams_opportunity)d" type="action" class="oe_sparkline_bar" title="Rate of won opportunities per duration.\n(last item is the most recent)"><t t-raw="record.won_opportunity_per_duration.raw_value"/></a>
+ <a name="%(action_report_crm_opportunity)d" type="action" class="oe_sparkline_bar" t-att-data-value="record.won_opportunity_per_duration.raw_value">Rate of won opportunities per duration.<br/>(last one is <t t-esc="record.target_duration_txt.raw_value"/>)</a>
</div>
</div>
</div>
});
}
});
- setTimeout(function () {self.$(".oe_sparkline_bar").sparkline('html', {type: 'bar', barWidth: 5} );}, 0);
+ setTimeout(function () {
+ self.$(".oe_sparkline_bar").each(function () {
+ var $el = $(this);
+ $el.data("title", $el.html());
+ $el.sparkline($el.data("value").split(','), {type: 'bar', barWidth: 5} );
+ $el.tipsy({'delayIn': 0, 'html': true, 'title': function(){return $(this).data("title")}, 'gravity': 'n'});
+ });
+ }, 0);
});
}
},
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='name']" position="after">
+
+
<field name="quotation_ids"/>
<field name="sale_order_ids"/>
<field name="invoice_ids"/>
+
+
<field name="sum_duration_invoice"/>
<field name="forcasted"/>
<field name="target_invoice"/>
</xpath>
<xpath expr="//div[@class='oe_items_list']" position="inside">
<div>
- <a name="%(action_quotations_salesteams)d" type="action"><t t-raw="record.quotation_ids.raw_value.length"/><t t-if="record.quotation_ids.raw_value.length >= 2">Quotations</t><t t-if="record.quotation_ids.raw_value.length < 2">Quotation</t></a>
- <a name="%(action_quotations_salesteams)d" type="action" class="oe_sparkline_bar"><t t-raw="[6,4,7,2,1]"/></a>
+ <a name="%(action_quotations_salesteams)d" type="action">Quotations</a>
+ <a name="%(action_quotations_salesteams)d" type="action" class="oe_sparkline_bar" data-value="6,4,7,2,6">jhfhgj</a>
</div>
<div>
- <a name="%(action_orders_salesteams)d" type="action"><t t-raw="record.sale_order_ids.raw_value.length"/><t t-if="record.sale_order_ids.raw_value.length >= 2">Sales Orders</t><t t-if="record.sale_order_ids.raw_value.length < 2">Sales Order</t>
- </a>
- <a name="%(action_orders_salesteams)d" type="action" class="oe_sparkline_bar"><t t-raw="[6,4,7,4,2]"/></a>
+ <a name="%(action_orders_salesteams)d" type="action">Sales Orders</a>
+ <a name="%(action_orders_salesteams)d" type="action" class="oe_sparkline_bar" data-value="6,4,7,2,6">jfhjh</a>
</div>
<div>
- <a name="%(action_invoice_salesteams)d" type="action" groups="account.group_account_invoice"><t t-raw="record.invoice_ids.raw_value.length"/><t t-if="record.invoice_ids.raw_value.length >= 2">Invoices</t><t t-if="record.invoice_ids.raw_value.length < 2">Invoice</t></a>
- <a name="%(action_invoice_salesteams)d" type="action" class="oe_sparkline_bar"><t t-raw="[6,4,7,2,6]"/></a>
+ <a name="%(action_invoice_salesteams)d" type="action" groups="account.group_account_invoice">Invoices</a>
+ <a name="%(action_invoice_salesteams)d" type="action" class="oe_sparkline_bar" data-value="6,4,7,2,6">jfghjgh</a>
</div>
</xpath>
<xpath expr="//div[@class='oe_items_list']" position="after">