[IMP]:crm:Improved SQL reports(Leads Analysis).
bzr revid: apa@tinyerp.com-20100527114836-hxdrjv0c3p9sukwf
This commit is contained in:
parent
1aed90730d
commit
d46d3ebdc3
|
@ -9,7 +9,7 @@
|
|||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Leads">
|
||||
<tree string="Leads Analysis">
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Cases">
|
||||
<form string="Leads Analysis">
|
||||
<field name="name" select="1"/>
|
||||
<field name="month" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
|
@ -54,7 +54,7 @@
|
|||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph orientation="horizontal" string="Leads" type="bar">
|
||||
<graph orientation="horizontal" string="Leads Analysis" type="bar">
|
||||
<field name="state"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field group="True" name="user_id"/>
|
||||
|
@ -69,103 +69,69 @@
|
|||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search">
|
||||
<group col="16" colspan="8">
|
||||
<!-- <filter string="This Year" name="This Year" icon="terp-hr"
|
||||
domain="[('name','=',time.localtime()[0])]"/>-->
|
||||
<filter string="This Year" icon="terp-hr"
|
||||
<search string="Leads Analysis">
|
||||
<group col="16" colspan="8">
|
||||
<filter string="Last 365 Days" icon="gtk-media-rewind"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
|
||||
<!-- <filter string="This Month" name="This Year" icon="terp-hr"
|
||||
domain="[('month','=',time.strftime('%%m'))]" />-->
|
||||
<filter string="This Month" icon="terp-hr" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
|
||||
<filter icon="gtk-media-rewind" string="7 Days" separator="1"
|
||||
<filter string="Last 30 Days" icon="gtk-media-rewind" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="gtk-media-rewind" string="7 Days" separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-hr"
|
||||
<filter icon="terp-crm"
|
||||
string="Draft"
|
||||
domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-hr"
|
||||
<filter icon="terp-crm"
|
||||
string="Open"
|
||||
domain="[('state','=','open')]"/>
|
||||
<filter icon="terp-hr"
|
||||
<filter icon="terp-crm"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}">
|
||||
|
||||
<filter icon="terp-crm"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
|
||||
<filter icon="terp-crm"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
</field>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company">
|
||||
<filter icon="terp-crm"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id.company_id','=',uid)]"
|
||||
help="My company"/>
|
||||
</field>
|
||||
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<filter icon="terp-crm" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-sale"
|
||||
<filter string="User" name="User" icon="terp-crm"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
|
||||
<filter string="Company" icon="terp-sale"
|
||||
<filter string="Company" icon="terp-crm"
|
||||
domain="[]"
|
||||
context="{'group_by':'company_id'}" />
|
||||
|
||||
<filter string="Section" icon="terp-sale"
|
||||
<filter string="Section" icon="terp-crm"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-sale"
|
||||
<filter string="State" icon="terp-crm"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
|
||||
<filter string="Stage" icon="terp-sale" domain="[]"
|
||||
<filter string="Stage" icon="terp-crm" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
|
||||
<filter string="Category" icon="terp-sale"
|
||||
<filter string="Category" icon="terp-crm"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-sale"
|
||||
<filter string="Day" icon="terp-crm"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
|
||||
<filter string="Month" icon="terp-sale"
|
||||
<filter string="Month" icon="terp-crm"
|
||||
domain="[]" context="{'group_by':'month'}" />
|
||||
|
||||
<filter string="Year" icon="terp-sale"
|
||||
<filter string="Year" icon="terp-crm"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
|
||||
<filter icon="terp-sale"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Cancel"
|
||||
domain="[('state','=','cancel')]"/>
|
||||
<group>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
</group>
|
||||
<field name="state"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -199,7 +165,7 @@
|
|||
<!-- Leads by user and section Action -->
|
||||
|
||||
<record id="action_report_crm_lead" model="ir.actions.act_window">
|
||||
<field name="name">Leads</field>
|
||||
<field name="name">Leads Analysis</field>
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
|
@ -246,7 +212,7 @@
|
|||
<field name="act_window_id" ref="action_report_crm_opportunity"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Leads" id="menu_report_crm_leads_tree"
|
||||
<menuitem name="Leads Analysis" id="menu_report_crm_leads_tree"
|
||||
groups="base.group_extended"
|
||||
parent="base.next_id_64" action="action_report_crm_lead" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue