Skip to content

Odoo 17 - Error Get Sales Teams (CrmTeamOdooModel) External API C# #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jseoaneChecksum opened this issue Jul 19, 2024 · 0 comments
Open

Comments

@jseoaneChecksum
Copy link

jseoaneChecksum commented Jul 19, 2024

I have a problem wanting to obtain the sales teams through the external API.
I get the model (CrmTeamOdooModel) and create the class, but when doing the query to bring in the sales teams I get the following error: {Odoo Server Error, Undefined graphical model for the sales team: Sales}

public async Task<OdooResult<CrmTeamOdooModel[]>> GetCrmTeams()
{
    try
    {
        var odooClient = await StartClientOdoo();
        var repository = new OdooRepository<CrmTeamOdooModel>(config);

        var crmTeams = await repository.Query().ToListAsync(); //Error  {Odoo Server Error, Undefined graphical model for the sales team: Sales}
 
        if (crmTeams .Error is not null)
        {
            throw new Exception(crmTeams .Error.ToString());
        }
 
        return crmTeams ;
    }
    catch (Exception)
    {
        throw;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant