Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PortaCapena.OdooJsonRpcClient/Converters/OdooModelMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static bool ConverOdooPropertyToDotNet(Type dotnetType, JToken value, out
return true;

case JTokenType.Integer when dotnetType == typeof(int) || dotnetType == typeof(int?) || dotnetType == typeof(long) || dotnetType == typeof(long?):
case JTokenType.Integer when dotnetType == typeof(float)|| dotnetType == typeof(float?) || dotnetType == typeof(double) || dotnetType == typeof(double?):
case JTokenType.Float:
result = value.ToObject(dotnetType);
return true;
Expand Down Expand Up @@ -260,4 +261,4 @@ public static string GetOdooEnumName(FieldInfo fieldInfo)
throw new ArgumentException($"Missing atrribute: '{nameof(EnumMemberAttribute)}' for enum '{fieldInfo.FieldType.Name}' - '{fieldInfo.Name}'");
}
}
}
}
Loading