Please review this at http://codereview.appspot.com/193054/show
Affected files:
M tryton/gui/window/view_form/widget_search/calendar.py
Index: tryton/gui/window/view_form/widget_search/calendar.py
===================================================================
--- a/tryton/gui/window/view_form/widget_search/calendar.py
+++ b/tryton/gui/window/view_form/widget_search/calendar.py
@@ -6,7 +6,7 @@
import gettext
import locale
from interface import Interface
-from tryton.common import DT_FORMAT, TRYTON_ICON
+from tryton.common import DT_FORMAT, DHM_FORMAT, TRYTON_ICON
from tryton.common import date_widget, Tooltips, datetime_strftime
from tryton.translate import date_format
import gobject
@@ -101,6 +101,9 @@
date = datetime.date(*time.strptime(value, self.format)[:3])
except:
return False
+ if self.attrs.get('type', 'date') == 'datetime':
+ return datetime_strftime(datetime.datetime.combine(date,
+ datetime.time.min), DHM_FORMAT)
return datetime_strftime(date, DT_FORMAT)
def _value_get(self):
--
Cédric Krier
B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email: [email protected]
Jabber: [email protected]
Website: http://www.b2ck.com/
twitter: http://twitter.com/cedrickrier
identi.ca: http://identi.ca/cedrickrier
pgp1yJkkEFb00.pgp
Description: PGP signature
