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:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
$.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 :)
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
Get host address or domain
Diselesaikan
|
|
1
Des 24
|
3799 | |
|
0
Jun 21
|
1894 | ||
|
2
Mei 24
|
4742 | ||
|
2
Jun 22
|
3958 | ||
|
0
Jun 21
|
2070 |