Amit (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-polish2_analysis_view_sale-kbh into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
  Amit (Open ERP) (apa-tiny)
  Antony Lesuisse (OpenERP) (al-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-polish2_analysis_view_sale-kbh/+merge/81972

==== summury ===
== Sale Analysis Report ===

* Change the sequence of button in crm_lead_report_view.xml
  ->putting year,month,month-1 button before lead,opportunity button in search 
view.

* putting separater between year and month button in search view in 
crm_lead_report_view.xml and in crm_phonecall_report_view.xml.
  
* make the year button Default_search_year:1 in  both files.

Thanks.

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-polish2_analysis_view_sale-kbh/+merge/81972
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-polish2_analysis_view_sale-kbh.
=== modified file 'crm/report/crm_lead_report_view.xml'
--- crm/report/crm_lead_report_view.xml	2011-11-09 18:12:56 +0000
+++ crm/report/crm_lead_report_view.xml	2011-11-11 12:19:30 +0000
@@ -72,6 +72,17 @@
             <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"
@@ -83,18 +94,7 @@
                             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')]"
@@ -221,7 +221,7 @@
            <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>
@@ -243,7 +243,7 @@
             <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_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>

=== modified file 'crm/report/crm_phonecall_report_view.xml'
--- crm/report/crm_phonecall_report_view.xml	2011-09-17 11:03:17 +0000
+++ crm/report/crm_phonecall_report_view.xml	2011-11-11 12:19:30 +0000
@@ -52,15 +52,14 @@
             <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" />
@@ -135,7 +134,7 @@
             <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>

=== modified file 'sale/report/sale_report_view.xml'
--- sale/report/sale_report_view.xml	2011-10-16 01:28:00 +0000
+++ sale/report/sale_report_view.xml	2011-11-11 12:19:30 +0000
@@ -22,7 +22,7 @@
                 <field name="nbr" sum="# of Lines"/>
                 <field name="product_uom_qty" sum="# of Qty"/>
                 <field name="shipped_qty_1" sum="Shipped"/>
-                <field name="uom_name" invisible="not context.get('set_visible',False)"/>
+                <field name="product_uom" invisible="not context.get('set_visible',False)"/>
                 <field name="price_total" sum="Total Price"/>
                 <field name="delay" sum="Commitment Delay"/>
                 <field name="state" invisible="1"/>
@@ -51,9 +51,10 @@
         <field name="arch" type="xml">
             <search string="Sales Analysis">
                 <group>
-                    <filter icon="terp-go-year" string="  Year  "
+                    <filter icon="terp-go-year" string="  Year  " name="year"
                         domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;=',time.strftime('%%Y-01-01'))]"
                         help="Sales order created in current year"/>
+                    <separator orientation="vertical"/>
                     <filter icon="terp-go-month" string="   Month   "
                         name="month"
                         domain="[('date','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"
@@ -123,7 +124,7 @@
         <field name="view_mode">tree,graph</field>
         <field name="search_view_id" ref="view_order_product_search"/>
         <field name="view_id" ref="view_order_product_tree"/>
-        <field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
+        <field name="context">{'search_default_year':1,'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
         <field name="help">This report performs analysis on your quotations and sales orders. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application.</field>
     </record>
 

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to