[IMP] hr_timesheet_sheet : Removed all filters related to a date field and added the related date field in the search view.

bzr revid: mdi@tinyerp.com-20120522072837-kfzhzjliex4nmlkt
This commit is contained in:
Divyesh Makwana (Open ERP) 2012-05-22 12:58:37 +05:30
parent a4d9633118
commit c249a5fe31
2 changed files with 1 additions and 28 deletions

View File

@ -41,20 +41,6 @@
<field name="arch" type="xml">
<search string="Timesheet">
<group>
<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="Timesheet 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'))]"
help="Timesheet in current month"/>
<filter icon="terp-go-month"
string=" Month-1 "
domain="[('date','&lt;=', (datetime.date.today() - relativedelta(day=31, months=1)).strftime('%%Y-%%m-%%d')),('date','&gt;=',(datetime.date.today() - relativedelta(day=1,months=1)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet of last month"/>
<separator orientation="vertical"/>
<field name="account_id" groups="analytic.group_analytic_accounting"/>
<field name="user_id"/>
</group>

View File

@ -49,20 +49,6 @@
<field name="arch" type="xml">
<search string="Timesheet">
<group>
<filter icon="terp-go-year" string="Year"
name="year"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')),('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in current year"/>
<separator orientation="vertical"/>
<filter icon="terp-go-month" string=" Month "
name="month"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in current month"/>
<filter icon="terp-go-month"
string=" Month-1 "
domain="[('date_current','&lt;=', (datetime.date (int(time.strftime('%%Y')), datetime.date.today().month, 1) - datetime.timedelta (days = 1)).strftime('%%Y-%%m-%%d')),('date_current','&gt;',(datetime.date (int(time.strftime('%%Y')), datetime.date.today().month-1, 1)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet of last month"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=','draft')]"/>
@ -87,6 +73,7 @@
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="date_current"/>
<field name="date_to"/>
<field name="date_from"/>
</group>