I use the JSON webservice to connect my software to OpenERP. All my requests work fine except the cash.box.in create one.
{
"jsonrpc" : "2.0",
"method" : "call",
"params" : {
"model" : "cash.box.in",
"method" : "create",
"args" : [{
"name" : "Test CashDeposit",
"amount" : 10
}
],
"kwargs" : {
"context" : {
"lang" : "fr_FR",
"tz" : "Europe/Paris",
"uid" : 1,
"active_model" : "pos.session",
"active_id" : 5,
"active_ids" : [5],
"search_disable_custom_filters" : true
}
},
"session_id" : "e45ef0c92afa4f19af978fd3a1148793",
"context" : {
"lang" : "fr_FR",
"tz" : "Europe/Paris",
"uid" : 1
}
},
"id" : "r5"
}
In the server log I can read this line when I send the request :
2016-01-15 19:57:19,559 9912 INFO db werkzeug: 127.0.0.1 - - [15/Jan/2016 19:57:19] "POST /web/dataset/call_kw HTTP/1.1" 200 -
I receive this response in my software :
{"jsonrpc":"2.0","id":"r5","result":9}
When I see the current session in OpenERP my cash deposit doesn't appears.
What's wrong ? Should I send something else to create a cash deposit request ? Any idea to trace the problem ?
I can send a test software if needed.
EDIT ----------------------------------------------------------------------------------------
I don't find any solution.
Here are the log lines with debug_rpc_answer level.
With my software :
2016-02-10 00:27:09,348 5868 INFO database werkzeug: 192.168.1.4 - - [10/Feb/2016 00:27:09] "POST /web/dataset/call_kw HTTP/1.1" 200 -
2016-02-10 00:27:16,805 5868 DEBUG database openerp.netsvc.rpc.request: object.execute_kw(u'database',
2016-02-10 00:27:16,805 5868 DEBUG database openerp.netsvc.rpc.request: 1,
2016-02-10 00:27:16,805 5868 DEBUG database openerp.netsvc.rpc.request: '*',
2016-02-10 00:27:16,805 5868 DEBUG database openerp.netsvc.rpc.request: u'cash.box.out',
2016-02-10 00:27:16,806 5868 DEBUG database openerp.netsvc.rpc.request: 'create',
2016-02-10 00:27:16,806 5868 DEBUG database openerp.netsvc.rpc.request: ({u'amount': 27, u'name': u'Ajustement du fond de caisse'},),
2016-02-10 00:27:16,806 5868 DEBUG database openerp.netsvc.rpc.request: {u'context': {u'active_id': 22,
2016-02-10 00:27:16,806 5868 DEBUG database openerp.netsvc.rpc.request: u'active_ids': [22],
2016-02-10 00:27:16,806 5868 DEBUG database openerp.netsvc.rpc.request: u'active_model': u'pos.session',
2016-02-10 00:27:16,806 5868 DEBUG database openerp.netsvc.rpc.request: u'lang': u'fr_FR',
2016-02-10 00:27:16,806 5868 DEBUG database openerp.netsvc.rpc.request: u'search_disable_custom_filters': True,
2016-02-10 00:27:16,806 5868 DEBUG database openerp.netsvc.rpc.request: u'tz': u'Europe/Paris',
2016-02-10 00:27:16,806 5868 DEBUG database openerp.netsvc.rpc.request: u'uid': 1}})
2016-02-10 00:27:16,812 5868 DEBUG database openerp.netsvc.rpc.response: object.execute_kw time:0.006s mem: 65700k -> 65704k (diff: 4k)12L
With the included POS :
2016-02-10 00:30:14,168 5868 INFO database werkzeug: 192.168.1.4 - - [10/Feb/2016 00:30:14] "POST /web/dataset/call_kw HTTP/1.1" 200 -
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: object.execute_kw(u'database',
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: 1,
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: '*',
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: u'cash.box.out',
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: 'create',
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: ({u'amount': 27, u'name': u'Ajustement du fond de caisse'},),
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: {u'context': {u'active_id': 22,
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: u'active_ids': [22],
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: u'active_model': u'pos.session',
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: u'lang': u'fr_FR',
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: u'search_disable_custom_filters': True,
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: u'tz': u'Europe/Paris',
2016-02-10 00:30:24,072 5868 DEBUG database openerp.netsvc.rpc.request: u'uid': 1}})
2016-02-10 00:30:24,076 5868 DEBUG database openerp.netsvc.rpc.response: object.execute_kw time:0.005s mem: 65776k -> 65780k (diff: 4k)13L
Any idea to trace the python code and understand the problem?