[FIX] base_action_rule : reverted fix as per the discussion with XAL : (Maintenance...
authorYannick Vaucher @ Camptocamp <>
Tue, 20 Mar 2012 05:09:05 +0000 (10:39 +0530)
committerRavi Gohil (Open ERP) <rgo@tinyerp.com>
Tue, 20 Mar 2012 05:09:05 +0000 (10:39 +0530)
bzr revid: rgo@tinyerp.com-20120320050905-yn4wbmltk6qgx88m

1  2 
addons/base_action_rule/base_action_rule.py

@@@ -31,6 -31,11 +31,11 @@@ import tool
  
  
  def get_datetime(date_field):
+     '''Return a datetime from a date string or a datetime string'''
+     #complete date time if date_field contains only a date
+     date_split = date_field.split(' ')
+     if len(date_split) == 1:
 -        date_field = date_split[0] + datetime.now().strftime(' %H:%M:%S')
++        date_field = date_split[0] + " 00:00:00"
      return datetime.strptime(date_field[:19], '%Y-%m-%d %H:%M:%S')