return r
@openerpweb.jsonrequest
- def translations(self, mods, lang):
+ def translations(self, req, mods, lang):
transs = {}
for addon_name in mods:
transl = {"messages":[]}
for x in po:
if x.id:
transl["messages"].append({'id': x.id, 'string': x.string})
- return transs
+ return {"modules": transs}
class Database(openerpweb.Controller):
@openerpweb.jsonrequest
def login(self, req, db, login, password):
req.session.login(db, login, password)
+ ctx = req.session.get_context()
return {
"session_id": req.session_id,
"uid": req.session._uid,
+ "context": ctx
}
@openerpweb.jsonrequest
""" Parses an arbitrary string containing a domain, transforms it
to either a literal domain or a :class:`openerpweb.nonliterals.Domain`
- :param domain: the domain to parse, if the domain is not a string it is assumed to
- be a literal domain and is returned as-is
+ :param domain: the domain to parse, if the domain is not a string it
+ is assumed to be a literal domain and is returned as-is
:param session: Current OpenERP session
:type session: openerpweb.openerpweb.OpenERPSession
"""
""" Parses an arbitrary string containing a context, transforms it
to either a literal context or a :class:`openerpweb.nonliterals.Context`
- :param context: the context to parse, if the context is not a string it is assumed to
- be a literal domain and is returned as-is
+ :param context: the context to parse, if the context is not a string it
+ is assumed to be a literal domain and is returned as-is
:param session: Current OpenERP session
:type session: openerpweb.openerpweb.OpenERPSession
"""