From 579965adc5cf6db67e5dc3b3c6dfd9162b171e90 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 13 Feb 2019 15:20:55 +0000 Subject: [PATCH] [IMP] api: RPC calls must always pass `context` as a keyword argument --- odoo/api.py | 6 +----- 1 file changed, 1 insertion(+), 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):