projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b882dd7
)
[FIX] service: wrapper: fixed context fetching. Indeed call_kw set its context
author
Thibault Delavallée
<tde@openerp.com>
Wed, 7 May 2014 11:06:37 +0000
(13:06 +0200)
committer
Thibault Delavallée
<tde@openerp.com>
Wed, 7 May 2014 11:06:37 +0000
(13:06 +0200)
in kwargs of kwargs, leading to a kwargception.
bzr revid: tde@openerp.com-
20140507110637
-qlj1rj8lrcpkejf6
openerp/service/model.py
patch
|
blob
|
history
diff --git
a/openerp/service/model.py
b/openerp/service/model.py
index
d65cbd7
..
2bbba4e
100644
(file)
--- a/
openerp/service/model.py
+++ b/
openerp/service/model.py
@@
-54,7
+54,8
@@
def check(f):
if args and isinstance(args[-1], dict):
ctx = args[-1]
elif isinstance(kwargs, dict):
- ctx = kwargs.get('context', {})
+ # kwargception because call_kw set its context in kwargs['kwargs']
+ ctx = kwargs.get('context', kwargs.get('kwargs', {}).get('context', {}))
uid = 1
if args and isinstance(args[0], (long, int)):