[IMP] crm: salesteams, add target_invoice field
bzr revid: chm@openerp.com-20130416124011-qbyf0wa5pvs36jp3
This commit is contained in:
parent
f53ed5bb56
commit
7394f41f83
|
@ -32,7 +32,7 @@ openerp.crm = function(openerp) {
|
|||
if ($el.data('action')) {
|
||||
$el.click(function (event) {
|
||||
event.stopPropagation();
|
||||
if (!$el.find(".oe_justgage_edit").size()) {
|
||||
if (self.view.is_action_enabled('edit') && !$el.find(".oe_justgage_edit").size()) {
|
||||
var $svg = $el.find('svg');
|
||||
$div = $('<div class="oe_justgage_edit" style="z-index: 1; position: absolute; width: ' + $svg.width() + 'px; top: ' + ($svg.height()/2-5) + 'px;"/>');
|
||||
$input = $('<input style="text-align: center; width: ' + ($svg.width()-40) + 'px; margin: auto;"/>').val($el.data('value'));
|
||||
|
|
|
@ -58,7 +58,8 @@ class crm_case_section(osv.osv):
|
|||
'sum_month_invoice': fields.function(_get_sum_month_invoice,
|
||||
string='Total invoiced this month',
|
||||
type='integer', readonly=True),
|
||||
'forcasted': fields.integer(string='Total forcasted for this month'),
|
||||
'forcasted': fields.integer(string='Total forcasted'),
|
||||
'target_invoice': fields.integer(string='Target Invoice'),
|
||||
}
|
||||
|
||||
def action_forcasted(self, cr, uid, id, value, context=None):
|
||||
|
|
|
@ -207,6 +207,19 @@
|
|||
<field name="act_window_id" ref="sale_crm.action_invoice_salesteams"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_section_salesteams_view_form" model="ir.ui.view">
|
||||
<field name="name">crm.case.section.form</field>
|
||||
<field name="model">crm.case.section</field>
|
||||
<field name="inherit_id" ref="crm.crm_case_section_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<field name="active" position="before">
|
||||
<field name="target_invoice"/>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_section_salesteams_view_kanban" model="ir.ui.view">
|
||||
<field name="name">crm.case.section.kanban</field>
|
||||
<field name="model">crm.case.section</field>
|
||||
|
@ -219,6 +232,7 @@
|
|||
<field name="invoice_ids"/>
|
||||
<field name="sum_month_invoice"/>
|
||||
<field name="forcasted"/>
|
||||
<field name="target_invoice"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@class='oe_items_list']" position="inside">
|
||||
<a name="%(action_quotations_salesteams)d" type="action">
|
||||
|
@ -239,8 +253,8 @@
|
|||
</xpath>
|
||||
<xpath expr="//div[@class='oe_items_list']" position="after">
|
||||
<div class="oe_center">
|
||||
<div class="oe_justgage" style="width:160px; height: 120px;" t-att-data-value="record.sum_month_invoice.raw_value" t-att-data-max="25000" data-label="this month">Invoiced</div>
|
||||
<div class="oe_justgage" style="width:160px; height: 120px;" t-att-data-value="record.forcasted.raw_value" t-att-data-max="25000" data-label="this month" data-action="action_forcasted">Forcasted</div>
|
||||
<div class="oe_justgage" style="width:160px; height: 120px;" t-att-data-value="record.sum_month_invoice.raw_value" t-att-data-max="record.target_invoice.raw_value" data-label="this month">Invoiced</div>
|
||||
<div class="oe_justgage" style="width:160px; height: 120px;" t-att-data-value="record.forcasted.raw_value" t-att-data-max="record.target_invoice.raw_value" data-label="this month" data-action="action_forcasted">Forcasted</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue