[FIX] Various "Today" filter issues

(static value creates timezone issues)
This commit is contained in:
Mohammed Shekha
2015-03-09 21:44:30 +01:00
committed by Richard Mathot
parent fede8a8cfb
commit b5f3656518
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -233,7 +233,7 @@
<separator/>
<filter string="My Events" help="My Events" domain="[('user_id','=',uid)]"/>
<separator/>
<filter string="Upcoming" name="upcoming" domain="[('date_begin','&gt;=', time.strftime('%%Y-%%m-%%d 00:00:00'))]" help="Upcoming events from today" />
<filter string="Upcoming" name="upcoming" domain="[('date_begin','&gt;=',datetime.datetime.now().replace(hour=0, minute=0, second=0))]" help="Upcoming events from today" />
<field name="type"/>
<field name="user_id"/>
<group expand="0" string="Group By">
+1 -1
View File
@@ -51,7 +51,7 @@
<search string="Hr Attendance Search">
<field name="name" string="Attendance"/>
<field name="action"/>
<filter string="Today" name="today" domain="[('name','&gt;=',current_date),('name','&lt;=',current_date)]" />
<filter string="Today" name="today" domain="[('name','&gt;=',datetime.datetime.now().replace(hour=0, minute=0, second=0)),('name','&lt;=',datetime.datetime.now().replace(hour=23, minute=59, second=59))]" />
<filter string="Current Month" domain="[('name','&gt;=', datetime.datetime.now().strftime('%Y-%m-01'))]" />
<separator/>
<filter string="My Attendance" domain="[('employee_id.user_id.id', '=', uid)]" />
+1 -1
View File
@@ -922,7 +922,7 @@
<field name="name" />
<filter string="Open" domain="[('state', '=', 'opened')]" />
<separator/>
<filter string="Today" domain="[('start_at', '>=', time.strftime('%%Y-%%m-%%d 00:00:00'))]" />
<filter string="Today" domain="[('start_at', '>=', datetime.datetime.now().replace(hour=0, minute=0, second=0))]" />
<field name="config_id" />
<field name="user_id" />
<group expand="0" string="Group By">
+1 -1
View File
@@ -1146,7 +1146,7 @@
<filter icon="terp-stock" string="To Do" name="future" domain="[('state','in',('assigned','confirmed','waiting'))]" help="Stock moves that are Confirmed, Available or Waiting"/>
<filter icon="terp-dialog-close" string="Done" name="done" domain="[('state','=','done')]" help="Stock moves that have been processed"/>
<separator/>
<filter icon="terp-go-today" string="Today" domain="[('date','&lt;=',time.strftime('%%Y-%%m-%%d 23:59:59')),('date','&gt;=',time.strftime('%%Y-%%m-%%d 00:00:00'))]" help="Orders processed Today or planned for Today"/>
<filter string="Today" domain="[('date','&lt;=',datetime.datetime.now().replace(hour=23, minute=59, second=59)),('date','&gt;=',datetime.datetime.now().replace(hour=0, minute=0, second=0))]" help="Orders processed Today or planned for Today"/>
<field name="product_id"/>
<field name="name" string="Location" filter_domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>
<field name="partner_id" string="Partner" filter_domain="[('picking_id.partner_id','child_of',self)]"/>