OdooJsonRpcClient icon indicating copy to clipboard operation
OdooJsonRpcClient copied to clipboard

Filter with Odoo V17 no longer work

Open JRB202 opened this issue 1 year ago • 1 comments

With this VB code you get same result for AllRecordList and FilteredRecordList (ie all records in both cases) with Odoo 17. This was working fine with Odoo 16

Obviously, ResPartnerOdooModel have been pasted from GetDotNetModel result

Testing code :

    Dim tableName = "res.partner"       
    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)


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

    Dim Myfilter As New OdooFilter
    Myfilter.EqualTo("display_name", "EXAMPLE CORP")

    Dim FilteredRecordList = Task.Run(Function() repository.Query().Where(Myfilter).ToListAsync()).Result

JRB202 avatar May 07 '24 10:05 JRB202

@JRB202 , Is it working for you with Odoo17? I cannot make it to pass the most of the tests. It says smth like " Not implemented json mapping value: '$"sale_delay": 0' to Nullable`1" I can't figure out where I should implement this. image

zolokonst avatar Jun 26 '24 06:06 zolokonst