i send data from extJS file to my odoo controller using Ext.Ajax.request like this :
Ext.Ajax.request({
url : '/serviceAP/fun',
headers :{
'Content-Type' : 'application/json'
},
method : 'POST',
jsonData : {"params":
{"cat" : "cat4",
"date" : "02/11/2015",
"notes" : "this notes 4"}
}
})
and the controller is like this :
@http.route('/serviceAP/fun', type="json", auth='public', website=True)
def func_test(self,**args):
http.request.env['sap.orders'].create({"cat": args['cat'], "order_date": args['date'],
"notes": args['notes']})
return None
it's works fine without any problem but now i want to add many params (cat5,cat6,...,catn) so i need to use a JS array i don't know how to handle it i tried many things but without result because this method is correct just for one json tuple i want to know how to handle it in the two side odoo (odoo controller/js return )