Raphael Collet (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-usability-replace_botton_lead_analysis-rmu
 into lp:~openerp-dev/openobject-addons/trunk-usability.

Requested reviews:
  Amit (Open ERP) (apa-tiny)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-usability-replace_botton_lead_analysis-rmu/+merge/70565

on Sales / Reporting / Leads Analysis. Replace the three buttons (Year, Month, 
Day) by two buttons: "Creation Date, Exp. Closing" that groups by month on 
these two fields.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-usability-replace_botton_lead_analysis-rmu/+merge/70565
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-usability.
=== modified file 'crm/report/crm_lead_report.py'
--- crm/report/crm_lead_report.py	2011-07-14 13:17:24 +0000
+++ crm/report/crm_lead_report.py	2011-08-05 13:31:37 +0000
@@ -31,6 +31,21 @@
     ('pending','Pending')
 ]
 
+MONTHS = [
+    ('01', 'January'),
+    ('02', 'February'),
+    ('03', 'March'),
+    ('04', 'April'),
+    ('05', 'May'),
+    ('06', 'June'),
+    ('07', 'July'),
+    ('08', 'August'),
+    ('09', 'September'),
+    ('10', 'October'),
+    ('11', 'November'),
+    ('12', 'December')
+]
+
 class crm_lead_report(osv.osv):
     """ CRM Lead Report """
     _name = "crm.lead.report"
@@ -45,12 +60,8 @@
         'channel_id':fields.many2one('res.partner.canal', 'Channel', readonly=True),
         'type_id':fields.many2one('crm.case.resource.type', 'Campaign', readonly=True),
         'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
-        'month':fields.selection([('01', 'January'), ('02', 'February'), \
-                                  ('03', 'March'), ('04', 'April'),\
-                                  ('05', 'May'), ('06', 'June'), \
-                                  ('07', 'July'), ('08', 'August'),\
-                                  ('09', 'September'), ('10', 'October'),\
-                                  ('11', 'November'), ('12', 'December')], 'Month', readonly=True),
+        'creation_month':fields.selection(MONTHS, 'Creation Date', readonly=True),
+        'deadline_month':fields.selection(MONTHS, 'Exp. Closing', readonly=True),
         'company_id': fields.many2one('res.company', 'Company', readonly=True),
         'create_date': fields.datetime('Create Date', readonly=True, select=True),
         'day': fields.char('Day', size=128, readonly=True),
@@ -88,8 +99,9 @@
                 SELECT
                     id,
                     to_char(c.date_deadline, 'YYYY') as name,
-                    to_char(c.date_deadline, 'MM') as month,
+                    to_char(c.date_deadline, 'MM') as deadline_month,
                     to_char(c.date_deadline, 'YYYY-MM-DD') as day,
+                    to_char(c.create_date, 'MM') as creation_month,
                     to_char(c.create_date, 'YYYY-MM-DD') as creation_date,
                     to_char(c.date_open, 'YYYY-MM-DD') as opening_date,
                     to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,

=== modified file 'crm/report/crm_lead_report_view.xml'
--- crm/report/crm_lead_report_view.xml	2011-07-26 12:50:37 +0000
+++ crm/report/crm_lead_report_view.xml	2011-08-05 13:31:37 +0000
@@ -18,7 +18,8 @@
                 <field name="channel_id" invisible="1"/>
                 <field name="type" invisible="1"/>
                 <field name="priority" invisible="1"/>
-                <field name="month" invisible="1"/>
+                <field name="creation_month" invisible="1"/>
+                <field name="deadline_month" invisible="1"/>
                 <field name="section_id" invisible="1"/>
                 <field name="user_id" invisible="1"/>
                 <field name="company_id" invisible="1"/>
@@ -143,13 +144,11 @@
                         <filter string="State" icon="terp-stock_effects-object-colorize"
                             domain="[]" context="{'group_by':'state'}" />
                         <separator orientation="vertical" />
-                        <filter string="Day" icon="terp-go-today"
-                            domain="[]" context="{'group_by':'day'}" help="Day on which lead/opportunity is created"/>
-                        <filter string="Month" icon="terp-go-month"
-                            domain="[]" context="{'group_by':'month'}" help="Month in which lead/opportunity is created"/>
-                        <filter string="Year" icon="terp-go-year"
-                            domain="[]" context="{'group_by':'name'}" help="Year in which lead/opportunity is created"/>
-                    </group>
+                        <filter string="Creation Date" icon="terp-go-month"
+                            domain="[]" context="{'group_by':'creation_month'}"/>
+                        <filter string="Exp. Closing"  icon="terp-go-month"
+                            domain="[]" context="{'group_by':'deadline_month'}"/>
+                        </group>
                 </search>
             </field>
         </record>
@@ -163,7 +162,8 @@
             <field name="arch" type="xml">
             <tree colors="blue:state in ('draft');black:state in ('open','pending','done');gray:state in ('cancel') " string="Opportunities Analysis">
                 <field name="name" invisible="1"/>
-                <field name="month" invisible="1"/>
+                <field name="creation_month" invisible="1"/>
+                <field name="deadline_month" invisible="1"/>
                 <field name="section_id" invisible="1" groups="base.group_extended"/>
                 <field name="user_id" invisible="1"/>
                 <field name="partner_id" invisible="1"/>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to