From 04e7f43b383b85bf6e35e92d50fbef094b6906d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 8 Oct 2008 12:20:07 +0200 Subject: [PATCH] Use ir.date --- sale.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sale.py b/sale.py index 5eb485bfa6..7486006f59 100644 --- a/sale.py +++ b/sale.py @@ -1,8 +1,8 @@ -#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. "Sale" from trytond.osv import fields, OSV -import datetime from decimal import Decimal from trytond.netsvc import LocalService from trytond.report import CompanyReport @@ -158,7 +158,8 @@ class Sale(OSV): return 'draft' def default_sale_date(self, cursor, user, context=None): - return datetime.date.today() + date_obj = self.pool.get('ir.date') + return date_obj.today(cursor, user, context=context) def default_currency(self, cursor, user, context=None): company_obj = self.pool.get('company.company')