fix(odoo): introduce secure connection option

This commit is contained in:
Ali BARIN
2023-12-11 14:29:40 +00:00
parent aefff5c861
commit 5971425d23
2 changed files with 26 additions and 3 deletions

View File

@@ -32,8 +32,10 @@ export const asyncMethodCall = async <T = number>($: IGlobalVariable, { method,
export const getClient = ($: IGlobalVariable, { path = 'common' }) => {
const host = $.auth.data.host as string;
const port = Number($.auth.data.port as string);
const secure = $.auth.data.secure === 'true';
const createClientFunction = secure ? xmlrpc.createSecureClient : xmlrpc.createClient;
return xmlrpc.createClient(
return createClientFunction(
{
host,
port,