[IMP] look and reports
This commit is contained in:
@@ -163,7 +163,7 @@ class crm_lead(format_address, osv.osv):
|
||||
|
||||
'id': fields.integer('ID', readonly=True),
|
||||
'name': fields.char('Opportunity', required=True, select=1),
|
||||
'active': fields.boolean('Archived', required=False),
|
||||
'active': fields.boolean('Active', required=False),
|
||||
'date_action_last': fields.datetime('Last Action', readonly=1),
|
||||
'date_action_next': fields.datetime('Next Action', readonly=1),
|
||||
'email_from': fields.char('Email', size=128, help="Email address of the contact", select=1),
|
||||
@@ -344,6 +344,9 @@ class crm_lead(format_address, osv.osv):
|
||||
"""
|
||||
return self.write(cr, uid, ids, {'probability': 0, 'active': False}, context=context)
|
||||
|
||||
def case_mark_unactive(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'active': False}, context=context)
|
||||
|
||||
def case_mark_active(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'active': True}, context=context)
|
||||
|
||||
|
||||
@@ -474,7 +474,7 @@ Andrew</field>
|
||||
<field name="name">Interest in your customizable Pcs</field>
|
||||
<field name="color">3</field>
|
||||
<field eval="15000" name="planned_revenue"/>
|
||||
<field eval="65.0" name="probability"/>
|
||||
<field eval="0" name="probability"/>
|
||||
<field name="contact_name">Robin Smith</field>
|
||||
<field name="partner_name">Global Solutions</field>
|
||||
<field eval="0" name="active"/>
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
help="Convert to Opportunity" class="oe_highlight"/>
|
||||
<button name="case_mark_won" string="Mark Won" attrs="{'invisible': [('probability', '=', 100)]}" type="object"/>
|
||||
<button name="case_mark_lost" string="Mark Lost" attrs="{'invisible': [('active', '=', False)]}" type="object"/>
|
||||
<button name="case_mark_active" string="Active" attrs="{'invisible': [('active', '=', True)]}" type="object" class="pull-right"/>
|
||||
<button name="case_mark_active" string="Active" attrs="{'invisible': [('active', '=', True)]}" type="object"/>
|
||||
<field name="stage_id" widget="statusbar" clickable="True"
|
||||
domain="['&', ('team_ids', '=', team_id), '|', ('type', '=', type), ('type', '=', 'both')]"
|
||||
options="{'fold_field': 'fold'}" attrs="{'invisible': [('active', '=', False)]}"
|
||||
@@ -183,7 +183,7 @@
|
||||
</group>
|
||||
<group name="misc" string="Misc">
|
||||
<field name="probability" groups="base.group_no_one"/>
|
||||
<field name="active"/>
|
||||
<field name="active" groups="base.group_no_one"/>
|
||||
<field name="referred"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -276,6 +276,7 @@
|
||||
<field name="stage_id" options='{"group_by_tooltip": {"requirements": "Description", "legend_priority": "Use of stars"}}'/>
|
||||
<field name="color"/>
|
||||
<field name="priority"/>
|
||||
<field name="active"/>
|
||||
<field name="planned_revenue"/>
|
||||
<field name="user_email"/>
|
||||
<field name="user_id"/>
|
||||
@@ -293,10 +294,10 @@
|
||||
<span class="fa fa-bars fa-lg"/>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
|
||||
<t t-if="widget.editable"><li><a type="edit">Edit Opportunity</a></li></t>
|
||||
<t t-if="widget.editable"><li><a type="edit">Edit</a></li></t>
|
||||
<t t-if="widget.deletable"><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="action_schedule_meeting" type="object">Schedule Meeting</a></li>
|
||||
<t t-if="! record.active.value"><li><a name="case_mark_active" type="object">Unarchive</a></li></t>
|
||||
<t t-if="record.active.value"><li><a name="case_mark_unactive" type="object">Archive</a></li></t>
|
||||
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -387,9 +388,12 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Opportunities">
|
||||
<header>
|
||||
<button name="case_mark_won" string="Mark Won" attrs="{'invisible': [('probability', '=', 100)]}" type="object" class="oe_highlight"/>
|
||||
<button name="case_mark_unactive" string="Archive" attrs="{'invisible': ['|', ('active','=',False), ('probability', '<', 100)]}" type="object" class="oe_highlight"/>
|
||||
<button name="case_mark_won" string="Mark Won" attrs="{'invisible': ['|', ('active','=',False), ('probability', '=', 100)]}" type="object" class="oe_highlight"/>
|
||||
<button name="case_mark_lost" string="Mark Lost" attrs="{'invisible': [('active', '=', False)]}" type="object" class="oe_highlight"/>
|
||||
<button name="case_mark_active" string="Active" attrs="{'invisible': [('active', '=', True)]}" type="object" class="pull-right"/>
|
||||
<button name="case_mark_active" string="Unarchive" attrs="{'invisible': [('active', '=', True)]}" type="object" class="oe_highlight"/>
|
||||
<div class="oe_crm_won" attrs="{'invisible': ['|', ('probability', '<', 100), ('active', '=', True)]}">Won</div>
|
||||
<div class="oe_crm_lost" attrs="{'invisible': ['|', ('probability', '>', 0), ('active', '=', True)]}">Lost</div>
|
||||
<field name="stage_id" widget="statusbar" clickable="True"
|
||||
options="{'fold_field': 'fold'}" attrs="{'invisible': [('active', '=', False)]}"
|
||||
domain="['&', ('team_ids', '=', team_id), '|', ('type', '=', type), ('type', '=', 'both')]"/>
|
||||
@@ -585,8 +589,9 @@
|
||||
<field name="probability"/>
|
||||
<field name="lost_reason"/>
|
||||
<separator/>
|
||||
<filter string="New" name="new"
|
||||
domain="['&', ('stage_id.probability', '=', 0), ('stage_id.sequence', '<=', 1)]"/>
|
||||
<filter string="Archived"
|
||||
domain="[('active', '=', False)]"/>
|
||||
<separator/>
|
||||
<filter string="Won" name="won"
|
||||
domain="['&', ('stage_id.probability', '=', 100), ('stage_id.fold', '=', True)]"/>
|
||||
<filter string="Lost" name="lost"
|
||||
|
||||
@@ -40,10 +40,18 @@
|
||||
<field name="type">opportunity</field>
|
||||
</record>
|
||||
|
||||
<record model="crm.stage" id="stage_lead6">
|
||||
<field name="name">Won</field>
|
||||
<field name="probability">100</field>
|
||||
<field name="on_change">1</field>
|
||||
<field name="sequence">80</field>
|
||||
<field name="type">opportunity</field>
|
||||
</record>
|
||||
|
||||
<record model="crm.team" id="sales_team.team_sales_department">
|
||||
<field name="stage_ids" eval="[ (4, ref('stage_lead1')), (4, ref('stage_lead2')),
|
||||
(4, ref('stage_lead3')), (4, ref('stage_lead4')),
|
||||
(4, ref('stage_lead5'))]"/>
|
||||
(4, ref('stage_lead5')), (4, ref('stage_lead6'))]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</record>
|
||||
<menuitem name="Activities" id="crm_activity_report_menu"
|
||||
groups="base.group_sale_manager"
|
||||
parent="base.menu_sale_report" action="crm_activity_report_action" sequence="6"/>
|
||||
parent="base.menu_sale_report" action="crm_activity_report_action" sequence="7"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -19,7 +19,7 @@ class crm_opportunity_report(osv.Model):
|
||||
'opening_date': fields.datetime('Assignation Date', readonly=True),
|
||||
'date_closed': fields.datetime('Close Date', readonly=True),
|
||||
'date_last_stage_update': fields.datetime('Last Stage Update', readonly=True),
|
||||
'active': fields.boolean('Archived', readonly=True),
|
||||
'active': fields.boolean('Active', readonly=True),
|
||||
|
||||
# durations
|
||||
'delay_open': fields.float('Delay to Assign',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
|
||||
@@ -56,9 +56,7 @@ class crm_opportunity_report(osv.Model):
|
||||
c.date_deadline,
|
||||
c.date_open as opening_date,
|
||||
c.date_closed as date_closed,
|
||||
|
||||
c.date_last_stage_update as date_last_stage_update,
|
||||
|
||||
c.user_id,
|
||||
c.probability,
|
||||
c.stage_id,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="name">crm.opportunity.report.pivot</field>
|
||||
<field name="model">crm.opportunity.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<pivot string="Leads Analysis" disable_linking="True">
|
||||
<pivot string="Pipeline Analysis" disable_linking="True">
|
||||
<field name="create_date" interval="month" type="col"/>
|
||||
<field name="stage" type="row"/>
|
||||
<field name="expected_revenue" type="measure"/>
|
||||
@@ -15,6 +15,18 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_report_crm_lead_pivot" model="ir.ui.view">
|
||||
<field name="name">crm.lead.report.pivot</field>
|
||||
<field name="model">crm.opportunity.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<pivot string="Leads Analysis" disable_linking="True">
|
||||
<field name="create_date" interval="month" type="row"/>
|
||||
<field name="team_id" type="col"/>
|
||||
</pivot>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Opportunities by user and team Graph View -->
|
||||
<record id="view_report_crm_opportunity_graph" model="ir.ui.view">
|
||||
<field name="name">crm.opportunity.report.graph</field>
|
||||
@@ -69,6 +81,11 @@
|
||||
<field name="model">crm.opportunity.report</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Opportunities Analysis">
|
||||
<filter string="Archived" name="archived"
|
||||
domain="[('active', '=', False)]"/>
|
||||
<filter string="Current" name="current"
|
||||
domain="[('active', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter name="lead" string="Lead" domain="[('type','=', 'lead')]" help="Show only lead"/>
|
||||
<filter name="opportunity" string="Opportunity" domain="[('type','=','opportunity')]" help="Show only opportunity"/>
|
||||
<separator/>
|
||||
@@ -86,7 +103,6 @@
|
||||
<field name="source_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('team_ids', '=', 'team_id')]" />
|
||||
<field name="campaign_id" widget="selection"/>
|
||||
<field name="medium_id" widget="selection"/>
|
||||
<field name="source_id" widget="selection"/>
|
||||
@@ -114,28 +130,41 @@
|
||||
</record>
|
||||
|
||||
<record id="action_report_crm_opportunity" model="ir.actions.act_window">
|
||||
<field name="name">Pipeline Analysis</field>
|
||||
<field name="name">Pipeline</field>
|
||||
<field name="res_model">crm.opportunity.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">pivot,graph</field>
|
||||
<field name="domain">[('active', 'in', [True,False])]</field>
|
||||
<field name="context">{'search_default_opportunity': 1}</field>
|
||||
<field name="help">Opportunities Analysis gives you an instant access to your opportunities with information such as the expected revenue, planned cost, missed deadlines or the number of interactions per opportunity. This report is mainly used by the sales manager in order to do the periodic review with the teams of the sales pipeline.</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_graph">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_report_crm_opportunity_graph"/>
|
||||
<field name="act_window_id" ref="action_report_crm_opportunity"/>
|
||||
<field name="domain">['|', ('active', '=', False), ('active', '=', True)]</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="context">{'search_default_opportunity': True, 'search_default_current': True}</field>
|
||||
<field name="help">Pipeline Analysis gives you an instant access to your opportunities with information such as the expected revenue, planned cost, missed deadlines or the number of interactions per opportunity. This report is mainly used by the sales manager in order to do the periodic review with the teams of the sales pipeline.</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_pivot">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">pivot</field>
|
||||
<field name="view_id" ref="view_report_crm_opportunity_pivot"/>
|
||||
<field name="act_window_id" ref="action_report_crm_opportunity"/>
|
||||
<record id="action_report_crm_opportunity_pivot" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">pivot</field>
|
||||
<field name="act_window_id" ref="action_report_crm_opportunity"/>
|
||||
<field name="view_id" ref="view_report_crm_opportunity_pivot"/>
|
||||
</record>
|
||||
<menuitem id="menu_report_crm_opportunities_tree"
|
||||
parent="base.menu_sale_report" action="action_report_crm_opportunity" sequence="5"/>
|
||||
parent="base.menu_sale_report" action="action_report_crm_opportunity" sequence="6"/>
|
||||
|
||||
<record id="action_report_crm_lead" model="ir.actions.act_window">
|
||||
<field name="name">Leads</field>
|
||||
<field name="res_model">crm.opportunity.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">pivot,graph</field>
|
||||
<field name="domain">['|', ('active', '=', False), ('active', '=', True)]</field>
|
||||
<field name="help">This report analyses the source of your leads (including those converted into opportunities).</field>
|
||||
</record>
|
||||
<record id="action_report_crm_lead_pivot" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">pivot</field>
|
||||
<field name="act_window_id" ref="action_report_crm_lead"/>
|
||||
<field name="view_id" ref="view_report_crm_lead_pivot"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_report_crm_lead_tree"
|
||||
parent="base.menu_sale_report" action="action_report_crm_lead" sequence="5"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<field name="res_model">crm.opportunity.report</field>
|
||||
<field name="context">{"search_default_month":1}</field>
|
||||
<field name="view_mode">graph,pivot</field>
|
||||
<field name="domain">[('type','=', 'lead'),('team_id', '=', active_id)]</field>
|
||||
<field name="domain">[('type','=', 'lead'),('team_id', '=', active_id), '|', ('active','=',True), ('active','=',False)]</field>
|
||||
<field name="help">Leads Analysis allows you to check different CRM related information like the treatment delays or number of leads per state. You can sort out your leads analysis by different groups to get accurate grained analysis.</field>
|
||||
</record>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<field name="name">Pipeline Analysis</field>
|
||||
<field name="res_model">crm.opportunity.report</field>
|
||||
<field name="view_mode">graph,pivot</field>
|
||||
<field name="domain">[('type','=', 'opportunity'), ('team_id', '=', active_id)]</field>
|
||||
<field name="domain">[('type','=', 'opportunity'), ('team_id', '=', active_id), '|', ('active','=',True), ('active','=',False)]</field>
|
||||
<field name="help">Opportunities Analysis gives you an instant access to your opportunities with information such as the expected revenue, planned cost, missed deadlines or the number of interactions per opportunity. This report is mainly used by the sales manager in order to do the periodic review with the teams of the sales pipeline.</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -1,4 +1,19 @@
|
||||
@charset "utf-8";
|
||||
.openerp .oe_margin_top_8 {
|
||||
margin-top: 8px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.openerp .oe_crm_lost {
|
||||
background-color: red;
|
||||
color: white;
|
||||
float: right;
|
||||
padding: 8px 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.openerp .oe_crm_won {
|
||||
background-color: green;
|
||||
color: white;
|
||||
float: right;
|
||||
padding: 8px 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user