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

bzr revid: mdi@tinyerp.com-20120522090403-sc6kckhn434g732y
This commit is contained in:
Divyesh Makwana (Open ERP) 2012-05-22 14:34:03 +05:30
parent 63964f4df4
commit 4bf7b26451
2 changed files with 2 additions and 29 deletions

View File

@ -82,8 +82,6 @@
<filter icon="terp-check" string="To Confirm" domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=',('confirmed'))]"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" name="Today" string="Today" domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"/>
<separator orientation="vertical"/>
<field name="user_id"/>
<field name="date"/>
<newline/>
@ -189,8 +187,6 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search CashMove">
<filter icon="terp-go-today" name="Today" string="Today" domain="[('create_date','&lt;=',time.strftime('%%Y-%%m-%%d 23:59:59'))]"/>
<separator orientation="vertical"/>
<field name="user_cashmove"/>
<field name="create_date"/>
<newline/>
@ -372,23 +368,10 @@
<field name="arch" type="xml">
<search string="Box Amount by User">
<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="Box amount 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="Box amount 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="Box amount in last month"/>
<separator orientation="vertical"/>
<field name="user_id"/>
<field name="box"/>
<field name="amount"/>
<field name="date"/>
</group>
<newline/>
<group expand="0" string="Group By...">

View File

@ -26,17 +26,7 @@
<field name="arch" type="xml">
<search string="Lunch Order Analysis">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Tasks performed in last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Tasks during last 7 days"/>
<field name="date"/>
</group>
<newline/>
<group expand="0" string="Group By...">