forked from saidimu/odoo
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi, i have a postgres function in my db, im using dbeaver and i have my function which is something like this:
CREATE OR REPLACE FUNCTION public.jr_ver_res_partner_4()
RETURNS TABLE(myData)
LANGUAGE plpgsql
AS $function$
BEGIN
return query select * from res_partner rp where RP.ID=4;
END;
$function$;
it works in my sql execute, but in my website im trying to call this function with something like this:
// Connect to Odoo
odoo.connect(function(err) {
if (err) { return console.log(err); }
console.log('conectado a odoo');
// View Delivery Order
odoo.rpc_call('public.jr_ver_res_partner_4()', '', function(err, result) {
if (err) {
console.log(err);
return;
}
console.log(result);
});
});
But it doesnt work, i recive a 404 code, how can i call one of my functions?? in the sql i execute it like this:
SELECT * FROM public.MyFunction()
but with node-odoo it doesnt works, what can i do?? thanks so much
Metadata
Metadata
Assignees
Labels
No labels