Skip to content
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

Not implemented json mapping value #76

Open
Maoie86 opened this issue Jun 16, 2023 · 2 comments
Open

Not implemented json mapping value #76

Maoie86 opened this issue Jun 16, 2023 · 2 comments

Comments

@Maoie86
Copy link

Maoie86 commented Jun 16, 2023

When I run a query containing this field ---> invoice_payments_widget, i get this error:

System.Exception: Not implemented json mapping value: '$"invoice_payments_widget": {
"title": "Less Payment",
"outstanding": false,
"content": [
{
"name": "Customer Payment 17,900.00 ₱ - Customer A - 05/24/2023",
"journal_name": "S12345678",
"amount": 17900.0,
"currency_id": 36,
"date": "2023-05-24",
"partial_id": 1,
"account_payment_id": 1,
"payment_method_name": "Manual",
"move_id": 4,
"ref": "PBNK1/2023/00001 (INV/2023/00001)",
"is_exchange": false,
"amount_company_currency": "17,900.00 ₱",
"amount_foreign_currency": false
}
]
}' to String
at PortaCapena.OdooJsonRpcClient.Converters.OdooModelMapper.ConverOdooPropertyToDotNet(Type dotnetType, JToken value, Object& result)
at PortaCapena.OdooJsonRpcClient.Converters.OdooModelConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at PortaCapena.OdooJsonRpcClient.OdooClient.CallAndDeserializeAsync[T](OdooRequestModel request, CancellationToken cancellationToken)

@patricoos
Copy link
Member

Have you tried to generate a new model?

@Maoie86
Copy link
Author

Maoie86 commented Jun 21, 2023

yes. The model AccountMoveOdooModel is newly generated and th invoice_payments_widget is mapped to a string in the class.

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

2 participants