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:
- Müşteri İlişkileri Yönetimi
- e-Commerce
- Muhasebe
- Envanter
- PoS
- Project
- MRP
Bu soru işaretlendi
$.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 :)
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Ol| İlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
|---|---|---|---|---|
| 
            
                Get host address or domain
            
            
                    Çözüldü
            
         |  | 1 Ara 24  | 5044 | |
|  | 0 Haz 21  | 3033 | ||
|  | 2 May 24  | 5838 | ||
|  | 2 Haz 22  | 5356 | ||
|  | 0 Haz 21  | 3203 | 
