Jagdish Panchal (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-908798-jap into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #908798 in OpenERP Addons: "leaves analysis -> improve report"
  https://bugs.launchpad.net/openobject-addons/+bug/908798

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-908798-jap/+merge/87068

Hello,

  hr_holidays: In leaves analysis report filter buttons Year|Month|Month-1 
added on the first line on the left --fixes=lp:908798

Thanks 
JAP
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-908798-jap/+merge/87068
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-908798-jap.
=== modified file 'hr_holidays/hr_holidays_view.xml'
--- hr_holidays/hr_holidays_view.xml	2011-12-28 14:20:11 +0000
+++ hr_holidays/hr_holidays_view.xml	2011-12-29 10:46:24 +0000
@@ -8,14 +8,17 @@
             <field name="arch" type="xml">
                 <search string="Search Leave">
                     <group>
+                        <filter icon="terp-go-year" name="year" string="Year" domain="[('date_from','&gt;=',time.strftime('%%Y-1-1')),('date_from','&lt;=',time.strftime('%%Y-12-31'))]"/>
+                        <separator orientation="vertical"/>
+                        <filter string="Month" icon="terp-go-month" name="This Month" domain="[('date_from','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date_from','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"/>
+                        <filter icon="terp-go-month" string=" Month-1 " 
+                         domain="[('date_from','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date_from','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
+                         help="Holidays during last month"/>                        
+                        <separator orientation="vertical"/>                    	
                         <filter icon="terp-check" domain="[('state','=','draft')]" string="To Confirm"/>
                         <filter icon="terp-camera_test" domain="[('state','=','confirm')]" string="To Approve" name="approve"/>
                         <filter icon="terp-camera_test" domain="[('state','=','validate')]" string="Validated" name="validated"/>
                         <separator orientation="vertical"/>
-                        <filter icon="terp-go-year" name="year" string="Year" domain="[('create_date','&gt;=',time.strftime('%%Y-1-1')),('create_date','&lt;=',time.strftime('%%Y-12-31'))]"/>
-                        <separator orientation="vertical"/>
-                        <filter string="Month" icon="terp-go-month" name="This Month" domain="[('date_from','&lt;=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date_from','&gt;=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"/>
-                        <separator orientation="vertical"/>
                         <field name="employee_id">
                             <filter icon="terp-personal" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leaves"/>
                         </field>

=== modified file 'hr_holidays/report/available_holidays_view.xml'
--- hr_holidays/report/available_holidays_view.xml	2011-01-21 06:59:40 +0000
+++ hr_holidays/report/available_holidays_view.xml	2011-12-29 10:46:24 +0000
@@ -8,7 +8,7 @@
             <field name="view_type">form</field>
             <field name="view_mode">tree,form</field>
             <field name="view_id" eval="view_holiday_simple"/>
-            <field name="context">{'search_default_group_employee': 1, 'search_default_group_type': 1}</field>
+            <field name="context">{'search_default_year':1, 'search_default_This Month':1, 'search_default_group_employee': 1, 'search_default_group_type': 1}</field>
             <field name="domain">[('holiday_type','=','employee')]</field>
             <field name="search_view_id" ref="view_hr_holidays_filter"/>
         </record>

_______________________________________________
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