[MERGE] hr_holidays: fixed bug 908798: added filter and group_by on leaves analysis
authorThibault Delavallée <tde@openerp.com>
Mon, 9 Jan 2012 15:38:46 +0000 (16:38 +0100)
committerThibault Delavallée <tde@openerp.com>
Mon, 9 Jan 2012 15:38:46 +0000 (16:38 +0100)
bzr revid: tde@openerp.com-20120109153846-xue897nvu7jgapxe

1  2 
addons/hr_holidays/hr_holidays_view.xml

                          <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'))]"/>
-                         <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-year" name="year" string="Year" domain="[('date_from','&gt;=',time.strftime('%%Y-1-1')),('date_from','&lt;=',time.strftime('%%Y-12-31'))]"/>
++                        <filter icon="terp-go-month" name="This Month" string="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" name="This Month-1" 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"/>
                          <field name="employee_id">
                              <filter icon="terp-personal" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leaves"/>
                          </field>
@@@ -25,6 -29,6 +28,8 @@@
                      </group>
                      <newline/>
                      <group expand="0" string="Group By...">
++                        <filter name="group_date_from" string="Start Date" icon="terp-personal" domain="[]" context="{'group_by':'date_from'}"/>
++                        <separator orientation="vertical"/>
                          <filter name="group_employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
                          <filter name="group_category" string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category_id'}"/>
                          <filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'manager_id'}"/>