Closed AnJ-Github closed 4 years ago
And why not string
instead of interface{}
?
Because the Id
sometimes is still just an Int
.
It would also break existing code:
reflect.Set: value of type int64 is not assignable to type string
So the interface{}
is the easiest solution - but not perfect and there is still work to be done with create, update etc...
Hey @Gumaa. All go-odoo api has changed. Please check if issue still exists with new version. thx.
Closing it. Reopen it if you still get the issue.
When fetching recurring
calendar.event
instead of event's ID beeing integer we get ID as a string. Something like this :'id': '10842-20190730060000'
And because of it we get an error during run time:
http: panic serving [::1]:58720: reflect.Set: value of type string is not assignable to type int64
Solution: Change
Id
type insidego-odoo > types
fromint64
tointerface{}
like this:Didn't check updating or deleting such records yet. But I guess it would not work as this methods still use
int64
.