skilld-labs / go-odoo

Golang wrapper for Odoo API
Apache License 2.0
86 stars 62 forks source link

omptempty instead of omitempty #53

Closed dragonis41 closed 6 months ago

dragonis41 commented 6 months ago

Hi,

In all structs, there is a typo in the xmlrpc field, the tag omptempty does not exist

dragonis41 commented 6 months ago

Just saw the commit 780bce5 where all fix are reverted to omptempty, why ? The xmlrpc you are using is clear :

for fields tagged with ",omitempty", empty values are omitted;

And in the code there is no support for omptempty

ahuret commented 6 months ago

very weird, indeed, I don't remember at all why it has been done this way. Thanks for reporting! I would be open for a pull request to fix it, if you have the time, otherwise I'll do this on my free time. Note that the generator template has to be modified too https://github.com/skilld-labs/go-odoo/blob/master/generator/cmd/tmpl/model.tmpl#L5

dragonis41 commented 6 months ago

I can do a PR yes, it won't take long to fix ^^

dragonis41 commented 6 months ago

Here you go !

ahuret commented 6 months ago

fixed by https://github.com/skilld-labs/go-odoo/pull/54