summaryrefslogtreecommitdiff
path: root/odoo/api.py
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2019-02-13 15:20:55 +0000
committerRaphael Collet <rco@odoo.com>2019-03-22 16:36:06 +0000
commit579965adc5cf6db67e5dc3b3c6dfd9162b171e90 (patch)
treed419a6cbe019eb2b2840e509bf3a877d27c10967 /odoo/api.py
parent5df4746c9aa144e6e3fce44fea43dac1089a5c51 (diff)
[IMP] api: RPC calls must always pass `context` as a keyword argument
Diffstat (limited to 'odoo/api.py')
-rw-r--r--odoo/api.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/odoo/api.py b/odoo/api.py
index b22d9ac2476..13d6f89f97c 100644
--- a/odoo/api.py
+++ b/odoo/api.py
@@ -292,11 +292,7 @@ def split_context(method, args, kwargs):
""" Extract the context from a pair of positional and keyword arguments.
Return a triple ``context, args, kwargs``.
"""
- pos = len(getargspec(method).args) - 1
- if pos < len(args):
- return args[pos], args[:pos], kwargs
- else:
- return kwargs.pop('context', None), args, kwargs
+ return kwargs.pop('context', None), args, kwargs
def model(method):