skilld-labs / go-odoo

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

fix: replace omptempty by omitempty in struct tag fields and fix some typos #54

Closed dragonis41 closed 6 months ago

dragonis41 commented 6 months ago

If someone with a working Odoo and code can check if I haven't broken anything before merging, it will be appreciated :)

ahuret commented 6 months ago

cc @Stolexiy (if you can check it doesn't break anything) :-) otherwise LGTM ! Thanks a lot @dragonis41 !!

dragonis41 commented 6 months ago

Wait I just saw a bug, I'll fix it ^^ Edit: this is fine

dragonis41 commented 6 months ago

I was thinking that my regex had put an extra "s" in the name of functions ending with an "s" but no, it was already here. Have I missed something or is this a typo in the function name ? ^^ https://github.com/skilld-labs/go-odoo/blob/65da36bbbdb134d922044b0b7de638b3d7f15b4e/res_users.go#L183C18-L183C33

ahuret commented 6 months ago

I was thinking that my regex had put an extra "s" in the name of functions ending with an "s" but no, it was already here. Have I missed something or is this a typo in the function name ? ^^ https://github.com/skilld-labs/go-odoo/blob/65da36bbbdb134d922044b0b7de638b3d7f15b4e/res_users.go#L183C18-L183C33

No worries, the Odoo model name is indeed res.users and not res.user. As the code is auto-generated, the extra "S" is added to signify it's plural. Though it might seem odd in the context of res.users, it's actually the intended behavior :-)

dragonis41 commented 6 months ago

Noted, It's all good for me then :)

Stolexiy commented 6 months ago

cc @Stolexiy (if you can check it doesn't break anything) :-) otherwise LGTM ! Thanks a lot @dragonis41 !!

No issues found, my code works as before. LGTM! Thanks, @dragonis41

dragonis41 commented 6 months ago

You're welcome :)