it's any way to call http controller from js and also pass arguments?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
$.ajax({
url: "/your/controller",
data: data,
type: 'POST',
processData: false,
contentType: false,
success: function(result) {
//success code
}
});
Using type: 'POST' you can call http controller.
Hi,
Please Refer the following blog to understand how to call http controller from js
https://www.cybrosys.com/blog/how-to-call-controller-method-from-javascript
Regards
var ajax = require('web.ajax');
var def = ajax.jsonRpc("/controller/route", 'call', {
... # your controller method parameters
});
return $.when(def).then(function (vals) {
...
});
No this only call json controller not http controller. Already tired not working and thanks for reply :)
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
1
12月 24
|
4219 | ||
|
0
6月 21
|
2290 | ||
|
2
5月 24
|
5092 | ||
|
2
6月 22
|
4521 | ||
|
0
6月 21
|
2484 |