[FIX] hr_holidays: In leaves analysis report filter buttons Year|Month|Month-1 added
lp bug: https://launchpad.net/bugs/908798 fixed bzr revid: jap@tinyerp.com-20111229104219-fbzgrcxpv9jxyqzp
This commit is contained in:
parent
d3866325f3
commit
d2d20a1d4c
|
@ -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','>=',time.strftime('%%Y-1-1')),('date_from','<=',time.strftime('%%Y-12-31'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Month" icon="terp-go-month" name="This Month" domain="[('date_from','<=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date_from','>=',(datetime.date.today()-relativedelta(day=1)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter icon="terp-go-month" string=" Month-1 "
|
||||
domain="[('date_from','<=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date_from','>=',(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','>=',time.strftime('%%Y-1-1')),('create_date','<=',time.strftime('%%Y-12-31'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Month" icon="terp-go-month" name="This Month" domain="[('date_from','<=',(datetime.date.today()+relativedelta(day=31)).strftime('%%Y-%%m-%%d')),('date_from','>=',(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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue