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
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
$.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 :)
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
Get host address or domain
Resuelto
|
|
1
dic 24
|
4023 | |
|
0
jun 21
|
2162 | ||
|
2
may 24
|
4939 | ||
|
2
jun 22
|
4298 | ||
|
0
jun 21
|
2349 |