Files
tryton/trytond/ir/date.py
T
Cédric Krier df1fd283ac New transaction management
Remove cursor, user and context from methods and use Transaction instead
2010-08-19 22:01:12 +02:00

27 lines
557 B
Python

#This file is part of Tryton. The COPYRIGHT file at the top level
#of this repository contains the full copyright notices and license terms.
from trytond.model import Model
import datetime
class Date(Model):
'Date'
_name = 'ir.date'
_description = __doc__
def __init__(self):
super(Date, self).__init__()
self._rpc.update({
'today': False,
})
def today(self):
'''
Current date
:return: a current datetime.date
'''
return datetime.date.today()
Date()