Intechnity-com / OdooJsonRpcClient

Odoo Client Json Rpc
MIT License
70 stars 33 forks source link

OdooClient.GetVersionAsync to never return? #84

Closed westdigitalfr closed 1 year ago

westdigitalfr commented 1 year ago

Hello - October 2023

New to odoo API (not so new to ASP.Net c# though).

Visual Studio 2022 v17.7.5 PortaCapena.OdooJsonRpcClient 1.0.20

We have an odoo trial account since... today. We could not find anything in the odoo documentation, that would prevent us from consuming their API with a trial account. However, simply calling the "OdooClient.GetVersionAsync" method - as described in your "First steps" chapter - never returns: you can wait 5 minutes if you want, nothing seems to be happening (at least, does it raise no exception). Excerpt of our code:

public partial class _default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        asyncMethod().Wait();
    }

    static async Task asyncMethod() {

        var config = new OdooConfig(
            apiUrl: "https://xxx.odoo.com",
            dbName: "xxx",
            userName: "admin",
            password: "admin"
        );

        var odooClient = new OdooClient(config);
        var versionResult = await odooClient.GetVersionAsync();
    }
}

where "xxx" is our account name in odoo.

Wondering if the situation could rely on the "admin / admin" combination, we set our odoo user / password instead, with no avail. We did not rename the database in our odoo account. We did not enable the multi-factor authentication.

Is there something that we may have missed?

Thanks!

Kind regards,

AD