[IMP] salesteams: comment and tooltip

bzr revid: chm@openerp.com-20130425130111-pq94g5v9o5rwyzts
This commit is contained in:
Christophe Matthieu 2013-04-25 15:01:11 +02:00
parent e1c042f2d3
commit 3cf1b01d1c
6 changed files with 36 additions and 16 deletions

View File

@ -44,10 +44,10 @@ AVAILABLE_PRIORITIES = [
]
DURATION_TXT = {
"monthly": _("this month"),
"semesterly": _("this semester"),
"semiannually": _("this semi"),
"annually": _("this year")
"monthly": _("month"),
"semesterly": _("semester"),
"semiannually": _("semi"),
"annually": _("year")
}
MONTHS = {
@ -191,13 +191,13 @@ class crm_case_section(osv.osv):
help="This enables the management of leads in the sales team. Otherwise the sales team manages only opportunities."),
'target_duration': fields.selection([("monthly", "Monthly"), ("semesterly", "Semesterly"), ("semiannually", "Semiannually"), ("annually", "Annually")],
string='Report duration view', required=True),
string='Report Duration View', required=True),
'target_duration_txt': fields.function(_get_target_duration_txt,
string='Duration',
type="string", readonly=True),
'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)
'won_opportunity_per_duration': fields.function(_get_won_opportunity_per_duration, string='Revenue of opporunities whon per duration', type="string", readonly=True)
}
def _get_stage_common(self, cr, uid, context):

View File

@ -101,11 +101,11 @@
<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="%(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"/>).<br/>Click to access to Leads Analysis</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.value"/>).<br/>Click to acces the Leads Analysis</a>
</div>
<div>
<a name="%(crm_case_form_view_salesteams_opportunity)d" type="action">Opportunities</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"/>).<br/>Click to access to Opportunities Analysis</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">Revenue of won opportunities per duration.<br/>(last one is <t t-esc="record.target_duration_txt.value"/>).<br/>Click to acces the Opportunities Analysis</a>
</div>
</div>
</div>
@ -116,6 +116,24 @@
</field>
</record>
<!-- Case Sections Search view -->
<record id="crm_case_section_salesteams_search" model="ir.ui.view">
<field name="name">Case Sections - Search</field>
<field name="model">crm.case.section</field>
<field name="arch" type="xml">
<search string="Salesteams Search">
<field name="name"/>
<field name="parent_id"/>
<field name="user_id"/>
<field name="note"/>
<group expand="0" string="Group By...">
<filter string="parent_id" domain="[]" context="{'group_by':'parent_id'}"/>
</group>
</search>
</field>
</record>
<!-- Case Sections Action -->
<record id="crm_case_section_salesteams_act" model="ir.actions.act_window">

View File

@ -25,7 +25,7 @@
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div {
width: 120px;
height: 20px;
height: 22px;
margin: 0;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div:nth-child(2n) {

View File

@ -118,7 +118,7 @@ class crm_case_section(osv.osv):
domain=[('state', 'not in', ['draft', 'cancel'])]),
'forecast': fields.integer(string='Total forecast'),
'target_invoice': fields.integer(string='Target Invoicing'),
'target_invoice': fields.integer(string='Invoicing Target'),
'created_quotation_per_duration': fields.function(_get_created_quotation_per_duration, string='Rate of created quotation per duration', type="string", readonly=True),
'validate_saleorder_per_duration': fields.function(_get_validate_saleorder_per_duration, string='Rate of validate sales orders per duration', type="string", readonly=True),
'sent_invoice_per_duration': fields.function(_get_sent_invoice_per_duration, string='Rate of sent invoices per duration', type="string", readonly=True),

View File

@ -8,6 +8,8 @@
</record>
<record model="crm.case.section" id="crm.crm_case_section_1">
<field name="name">Indirect Sales</field>
<field name="code">IM</field>
<field name="forecast">36000</field>
<field name="target_invoice">40000</field>
</record>

View File

@ -235,15 +235,15 @@
<xpath expr="//div[@class='oe_items_list']" position="inside">
<div>
<a name="%(action_quotations_salesteams)d" type="action">Quotations</a>
<a name="%(sale.action_order_report_all)d" type="action" class="oe_sparkline_bar" t-att-data-value="record.created_quotation_per_duration.raw_value">Rate of created quotation per duration.<br/>(last one is <t t-esc="record.target_duration_txt.raw_value"/>).<br/>Click to access to Sales Analysis</a>
<a name="%(sale.action_order_report_all)d" type="action" class="oe_sparkline_bar" t-att-data-value="record.created_quotation_per_duration.raw_value">Revenue of created quotation per <t t-esc="record.target_duration_txt.value"/>.<br/>Click to acces the Sales Analysis</a>
</div>
<div>
<a name="%(action_orders_salesteams)d" type="action">Sales Orders</a>
<a name="%(sale.action_order_report_all)d" type="action" class="oe_sparkline_bar" t-att-data-value="record.validate_saleorder_per_duration.raw_value">Rate of validate sales orders per duration.<br/>(last one is <t t-esc="record.target_duration_txt.raw_value"/>).<br/>Click to access to Sales Analysis</a>
<a name="%(sale.action_order_report_all)d" type="action" class="oe_sparkline_bar" t-att-data-value="record.validate_saleorder_per_duration.raw_value">Revenue of confirmed sales orders per <t t-esc="record.target_duration_txt.value"/>).<br/>Click the acces to Sales Analysis</a>
</div>
<div>
<a name="%(action_invoice_salesteams)d" type="action" groups="account.group_account_invoice">Invoices</a>
<a name="%(account.action_account_invoice_report_all)d" type="action" class="oe_sparkline_bar" t-att-data-value="record.sent_invoice_per_duration.raw_value">Rate of sent invoices per duration.<br/>(last one is <t t-esc="record.target_duration_txt.raw_value"/>).<br/>Click to access to Invoices Analysis</a>
<a name="%(account.action_account_invoice_report_all)d" type="action" class="oe_sparkline_bar" t-att-data-value="record.sent_invoice_per_duration.raw_value">Revenue of sent invoices per <t t-esc="record.target_duration_txt.value"/>.<br/>Click to acces the Invoices Analysis</a>
</div>
</xpath>
<xpath expr="//div[@class='oe_items_list']" position="after">
@ -251,15 +251,15 @@
<div class="oe_justgage" style="width:160px; height: 120px;"
t-att-data-value="record.sent_invoice_per_duration.raw_value.pop()"
t-att-data-max="record.target_invoice.raw_value"
t-att-data-label="record.target_duration_txt.raw_value">Invoiced</div>
t-att-data-label="_.str.sprintf(_t('this %%s'), record.target_duration_txt.value)">Invoiced</div>
<div class="oe_justgage" style="width:160px; height: 120px;"
t-att-data-value="record.forecast.raw_value"
t-att-data-max="record.target_invoice.raw_value"
t-att-data-label="record.target_duration_txt.raw_value"
t-att-data-label="_.str.sprintf(_t('this %%s'), record.target_duration_txt.value)"
data-action="action_forecast">Forecast</div>
</div>
<div class="oe_center" style="color:#bbbbbb;" t-if="!record.target_invoice.raw_value">
<br/>Not target invoicing define
<br/>Not target invoicing defined
</div>
</xpath>
</data>