Commit 8f81640d authored by niv-openerp's avatar niv-openerp

[imp] added possibility to pass kwargs when we call an object

parent 15965a81
......@@ -236,19 +236,19 @@ class Model(object):
:param method: The method for the linked model (search, read, write, unlink, create, ...)
"""
def proxy(*args):
def proxy(*args, **kw):
"""
:param args: A list of values for the method
"""
self.connection.check_login(False)
self.__logger.debug(args)
result = self.connection.get_service('object').execute(
result = self.connection.get_service('object').execute_kw(
self.connection.database,
self.connection.user_id,
self.connection.password,
self.model_name,
method,
*args)
args, kw)
if method == "read":
if isinstance(result, list) and len(result) > 0 and "id" in result[0]:
index = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment