[Openerp-community] [Merge] lp:~openerp-community/openobject-addons/6.0-bug-907723 into lp:openobject-addons/6.0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Openerp-community] [Merge] lp:~openerp-community/openobject-addons/6.0-bug-907723 into lp:openobject-addons/6.0

Niels Huylebroeck
Niels Huylebroeck has proposed merging lp:~openerp-community/openobject-addons/6.0-bug-907723 into lp:openobject-addons/6.0.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #907723 in OpenERP Addons: "[6.0/Trunk] base_action_rule - action scheduler doesn't accept some date fields"
  https://bugs.launchpad.net/openobject-addons/+bug/907723

For more details, see:
https://code.launchpad.net/~openerp-community/openobject-addons/6.0-bug-907723/+merge/96126

Bugfix for 907723 as already merged in trunk
--
https://code.launchpad.net/~openerp-community/openobject-addons/6.0-bug-907723/+merge/96126
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/6.0-bug-907723.

=== modified file 'base_action_rule/base_action_rule.py'
--- base_action_rule/base_action_rule.py 2012-02-15 10:59:41 +0000
+++ base_action_rule/base_action_rule.py 2012-03-06 14:14:18 +0000
@@ -31,6 +31,12 @@
 
 
 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] + " 00:00:00"
+  
     return datetime.strptime(date_field[:19], '%Y-%m-%d %H:%M:%S')
 
 


_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp