Use ir.date
This commit is contained in:
1 parent
b02f905308
commit
04e7f43b38
1 file changed
+4
-3
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user