Intechnity-com / OdooJsonRpcClient

Odoo Client Json Rpc
MIT License
67 stars 29 forks source link

Error with repository.Query().ToListAsync on account.move with Odoo V17 #98

Open JRB202 opened 4 months ago

JRB202 commented 4 months ago

With this VB code you get an execution error with Odoo V17

Obviously, AccountMoveOdooModel have been pasted from GetDotNetModel result

Testing code :

    Dim tableName = "account.move"       
    Dim modelResult = Task.Run(Function() odooClient.GetModelAsync(tableName)).Result

    ' Get the model structure to copy and paste in code
    ' To convert C# to VB : https://converter.telerik.com/
    Dim modelResultClass = OdooModelMapper.GetDotNetModel(tableName, modelResult.Value)
    ' Model is well returned and contains "tax_totals"

    Dim repository = New OdooRepository(Of OdooClass.AccountMoveOdooModel)(config) 
    Dim AllRecordList = Task.Run(Function() repository.Query().ToListAsync()).Result

The error message is : System.Exception: Not implemented json mapping value: '$"tax_totals"

"tax_totals" is well declared in AccountMoveOdooModel with : <JsonProperty("tax_totals")> Public Property TaxTotals As String

But not this nasty '$"tax_totals" Note the strange $ char !