diff --git a/src/controllers/odoo.ts b/src/controllers/odoo.ts index 6fea994..5b0d949 100755 --- a/src/controllers/odoo.ts +++ b/src/controllers/odoo.ts @@ -19,11 +19,12 @@ export class Odoo { private _db: string; private _password: string; - constructor(host: string, port = 443) { - this._client = createSecureClient({ + constructor(host: string, port = 443, secure: boolean = false) { + this._client = secure ? createSecureClient({ host: host, port: port - }); + }) : createClient({ host: host, port: port }) + } private _commonPath() {