[IMP]sale:improvement analysis report
authorKhushboo Bhatt (Open ERP) <kbh@tinyerp.com>
Thu, 10 Nov 2011 06:03:02 +0000 (11:33 +0530)
committerKhushboo Bhatt (Open ERP) <kbh@tinyerp.com>
Thu, 10 Nov 2011 06:03:02 +0000 (11:33 +0530)
bzr revid: kbh@tinyerp.com-20111110060302-stiq4agxsz60a47l

addons/crm/report/crm_lead_report_view.xml
addons/crm/report/crm_phonecall_report_view.xml

index 623f9a4..6232b54 100644 (file)
             <field name="arch" type="xml">
                 <search string="Leads Analysis">
                     <group>
+                        <filter string="  Year  " icon="terp-go-year" name="year"
+                            domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-01-01'))]"
+                            help="Leads/Opportunities created in current year"/>
+                        <separator orientation="vertical" />
+                        <filter string="   Month   " icon="terp-go-month" name="this_month"
+                            domain="[('create_date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
+                            help="Leads/Opportunities created in current month"/>
+                        <filter icon="terp-go-month" string="    Month-1    "
+                            domain="[('create_date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
+                            help="Leads/Opportunities created in last month"/>
+                        <separator orientation="vertical" />
                         <filter icon="terp-personal"
                             name="lead"
                             string="Lead"
                             domain="[('type','=','opportunity')]"
                             help="Show only opportunity"/>
                         <separator orientation="vertical" />
-                        <filter string="  Year  " icon="terp-go-year"
-                            domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-01-01'))]"
-                            help="Leads/Opportunities created in current year"/>
-                        <separator orientation="vertical" />
-                        <filter string="   Month   " icon="terp-go-month" name="this_month"
-                            domain="[('create_date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
-                            help="Leads/Opportunities created in current month"/>
-                        <filter icon="terp-go-month" string="    Month-1    " 
-                            domain="[('create_date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
-                            help="Leads/Opportunities created in last month"/>
 
-                        <separator orientation="vertical" />
                         <filter icon="terp-check"
                             string="New"
                             domain="[('state','=','draft')]"
            <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_lead': 1, "search_default_user":1, "search_default_this_month":1, 'group_by_no_leaf':1, 'group_by':[]}</field>
+           <field name="context">{'search_default_year': 1,'search_default_lead': 1, "search_default_user":1, "search_default_this_month":1, 'group_by_no_leaf':1, 'group_by':[]}</field>
            <field name="view_mode">tree,graph</field>
            <field name="domain">[]</field>
            <field name="help">Leads Analysis allows you to check different CRM related information. Check for treatment delays, number of responses given and emails sent. You can sort out your leads analysis by different groups to get accurate grained analysis.</field>
             <field name="name">Opportunities Analysis</field>
             <field name="res_model">crm.lead.report</field>
             <field name="view_type">form</field>
-            <field name="context">{"search_default_opportunity":1,"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
+            <field name="context">{"search_default_year":1,"search_default_opportunity":1,"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
             <field name="view_mode">tree,graph</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>
index 2f40ba3..edbe4da 100644 (file)
             <field name="arch" type="xml">
                 <search string="Search">
                   <group>
-                           <filter string="  Year  " icon="terp-go-year"
+                        <filter string="  Year  " icon="terp-go-year" name="year"
                                domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')),('create_date','&gt;=',time.strftime('%%Y-01-01'))]"
                                help="Phone calls made in current year"/>
-
-                       <filter string="   Month   " icon="terp-go-month" name="This Month"
+                        <separator orientation="vertical" />
+                        <filter string="   Month   " icon="terp-go-month" name="This Month"
                            domain="[('create_date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
                            help="Phone calls made in current month"/>
-
-                       <filter icon="terp-go-month" string="    Month-1    " 
+                        <filter icon="terp-go-month" string="    Month-1    "
                             domain="[('create_date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('create_date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
                             help="Phone calls made in last month"/>
                         <separator orientation="vertical" />
             <field name="res_model">crm.phonecall.report</field>
             <field name="view_type">form</field>
             <field name="view_mode">tree,graph</field>
-            <field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
+            <field name="context">{"search_default_year":1,"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
             <field name="view_id" ref="view_report_crm_phonecall_tree"/>
             <field name="search_view_id" ref="view_report_crm_phonecall_filter"/>
             <field name="help">From this report, you can analyse the performance of your sales team, based on their phone calls. You can group or filter the information according to several criteria and drill down the information, by adding more groups in the report.</field>