Skip to content

Commit

Permalink
[IMP] api: RPC calls must always pass context as a keyword argument
Browse files Browse the repository at this point in the history
  • Loading branch information
rco-odoo committed Mar 22, 2019
1 parent 5df4746 commit 579965a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions odoo/api.py
Expand Up @@ -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):
Expand Down

0 comments on commit 579965a

Please sign in to comment.