From d55dc277334cb5fbea4c772f57cc8852b49ff184 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 8 Oct 2008 12:20:33 +0200 Subject: [PATCH] Use ir.date --- line.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/line.py b/line.py index 3664b9938f..b6e15245f8 100644 --- a/line.py +++ b/line.py @@ -1,9 +1,9 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. +#This file is part of Tryton. The COPYRIGHT file at the top level +#of this repository contains the full copyright notices and license terms. "Timesheet Line" from trytond.osv import fields, OSV from trytond.wizard import Wizard, WizardOSV -import datetime class Line(OSV): @@ -48,11 +48,13 @@ class Line(OSV): return False def default_date(self, cursor, user, context=None): + date_obj = self.pool.get('ir.date') + if context is None: context = {} if context.get('date'): return context['date'] - return datetime.date.today() + return date_obj.today(cursor, user, context=context) def view_header_get(self, cursor, user, value, view_type='form', context=None):