Fix bad default value for date, return now a datetime object

This commit is contained in:
Cédric Krier committed 2008-04-25 14:17:37 +02:00
1 parent fe49a6623c
commit c8a4007ad0
1 file changed
+2 -1
+2 -1
View File
@@ -3,6 +3,7 @@
from trytond.osv import fields, OSV, ExceptOSV
import time
from decimal import Decimal
import datetime
class Currency(OSV):
@@ -135,7 +136,7 @@ class Rate(OSV):
self._order.insert(0, ('date', 'DESC'))
def default_date(self, cursor, user, context=None):
return time.strftime('%Y-%m-%d')
return datetime.date.today()
Rate()