vettloffah / odoo-await

Odoo API client featuring async await.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change "url" to "baseUrl" in the README

soyantonio opened this issue · comments

Description

According to the current documentation, to change the Odoo url, the url should be changed when the Object is constructed.

const odoo = new Odoo({
    url: 'http://other-domain',
    port: 8069,
    db: 'odoo_db',
    username: 'admin',
    password: 'admin'
});

await odoo.connect();

Expected behavior

Odoo service should try to connect to http://other-domain

Actual behavior

Odoo service tries to connect to http://localhost. The reason is at lib/index.js, url field is not present

odoo-await/lib/index.js

Lines 24 to 32 in b5cc5be

let defaults = {
baseUrl: 'http://localhost',
port: 8069,
db: 'odoo_db',
username: 'admin',
password: 'admin'
}

If baseURL will be the chosen name, then the README should be changed. This will reduce the friction to use this module

Thanks for pointing that out. I've updated the readme.