Comments (3)
Hello David,
Glad to see you've got interest in that tool :)
The NilableType is indeed kinda tricky.
The main issue is Odoo will send a false
if a field is not set; so a field of type
int64
for instance won't be able to cope with such false
value.
We could have decided to use only interface{}
type and require go-odoo users to type their fields when they need to but instead we decided to go the strongly typed way (so one doesn't have to care much about fields types).
To do so we had to create a nilable
structure which uses only interface{}
typed fields (except for Booleans for which false
isn't an issue) that is used for loading data from Odoo (
Line 81 in 1a704aa
Line 90 in 1a704aa
load
method that would inspect the nilable variant of the object in order to create a properly typed one (Line 39 in c83e3b8
Read
/ SearchRead
methods (Line 85 in 1a704aa
Hope that helps :)
Thank you for your contrib efforts on other issues. We surely gonna adopt / contribute with you on those matters in a few (at the moment we're kinda busy).
from go-odoo.
Done https://github.com/skilld-labs/go-odoo/wiki ;)
from go-odoo.
Wow, could not have been clearer! Copy past to the wiki it! 😉
from go-odoo.
Related Issues (20)
- Fetching recurring event gives an error due to missmatching event's ID type HOT 4
- There is no way to close off the connection HOT 5
- Strange error calling SaaS API from odoo.com lately HOT 2
- Interface conversion problem when using FindProductProduct HOT 3
- Modular templates HOT 3
- How I can use args with ExecuteKw HOT 2
- update for go1.16 HOT 4
- go generate not generating anything HOT 7
- Error on update operations with datetime fields HOT 3
- How to pass keywords to ExecuteKw() ? HOT 2
- Error when try to get ir.attachment HOT 9
- How to consult with or? HOT 5
- Is it possible to change the password of an odoo user with the library? HOT 2
- Error when try to get stock.picking HOT 4
- Is it possible to do full text search with the library? HOT 3
- type "not found" error + do it in low level functions HOT 1
- Use relational type (to create an an invoice) HOT 2
- Remove Many2One HOT 11
- omptempty instead of omitempty HOT 5
- .Get() on all fields ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-odoo.