else:
raise Exception, 'ReportNotFound'
+ class translation(netsvc.ExportService):
+
+ def __init__(self, name="translation"):
+ netsvc.ExportService.__init__(self, name)
+
+ def exp_load(self, db, modules, langs, flag=None, context=None):
+ cr = pooler.get_db(db).cursor()
+ translated_data = pooler.get_pool(db).get('ir.translation').load(cr, modules, langs, flag, context=context)
+ cr.commit()
+ cr.close()
+ return translated_data
+
+ def dispatch(self, method, params):
+ if method in ['load']:
+ # No security check for these methods
+ pass
+ else:
+ raise KeyError("Method not found: %s" % method)
+ fn = getattr(self, 'exp_'+method)
+ return fn(*params)
+
-translation()
def start_web_services():
db()