Extended `common.about` to return version info

bzr revid: ame@tinyerp.com-20080805075426-6bqtncd6k9qsvo29
This commit is contained in:
Amit Mendapara 2008-08-05 13:24:26 +05:30
parent b90a2b3875
commit 6bef1c97a1
1 changed files with 12 additions and 2 deletions

View File

@ -329,8 +329,14 @@ class common(netsvc.Service):
logger.notifyChannel("web-service", netsvc.LOG_INFO, "%s from '%s' using database '%s'" % (msg, login, db))
return res or False
def about(self):
return _('''
def about(self, extended=False):
"""Return information about the OpenERP Server.
@param extended: if True then return version info
@return string if extended is False else tuple
"""
info = _('''
OpenERP is an ERP+CRM program for small and medium businesses.
@ -339,6 +345,10 @@ GNU Public Licence.
(c) 2003-TODAY, Fabien Pinckaers - Tiny sprl''')
if extended:
return info, tinyerp_version
return info
def timezone_get(self, db, login, password):
return time.tzname[0]
common()