add rpc method to get the version of the server

bzr revid: christophe@tinyerp.com-20080820082019-3v0d2gzjzchsb942
This commit is contained in:
Christophe Simonis 2008-08-20 10:20:19 +02:00
parent 6fa9175cc5
commit 2656522a63
1 changed files with 7 additions and 0 deletions

View File

@ -56,6 +56,7 @@ class db(netsvc.Service):
self.exportMethod(self.list)
self.exportMethod(self.list_lang)
self.exportMethod(self.change_admin_password)
self.exportMethod(self.server_version)
self.actions = {}
self.id = 0
self.id_protect = threading.Semaphore()
@ -281,6 +282,12 @@ class db(netsvc.Service):
lang = os.path.basename(fname).split(".")[0]
return (lang, lang_dict.get(lang, lang))
return [lang_tuple(fname) for fname in file_list]
def server_version(self):
""" Return the version of the server
Used by the client to verify the compatibility with its own version
"""
return tinyerp_version
db()
class common(netsvc.Service):