Closed dreispt closed 2 years ago
What a great day to merge this nice PR. Let's do it! Prepared branch 14.0-ocabot-merge-pr-68-by-dreispt-bump-patch, awaiting test results.
Congratulations, your PR was merged at d8bd41378a16b2867c51067cb83112500736c6c6. Thanks a lot for contributing to OCA. ❤️
Hi @dreispt, if i am not mistaken, the contact gets updated every time an invoice is sent, right?
Also, why do you send non required contact data to the API? Only name and code are required...
Yes. When we weren’t doing it we got invoices for outdated addresses.
What contact data are we missing?
Yes. When we weren’t doing it we got invoices for outdated addresses.
Hi @dreispt, thank you for your response.
Ok, instead of updating the contact for each invoice, you could store a hash of the last sent data and compare it every time you send the invoice, so you only make a request to the API when the contact information changes.
What contact data are we missing?
What i am trying to say is that it is not necessary to send all the contact information, only the code
and name
.
I see, you mean avoid unnecessary requests, not really data missing on calls. What you suggest is more efficient for sure. It will add more lines of code, but It would be a welcome addition if you want to propose it.
What i am trying to say is that it is not necessary to send all the contact information, only the code and name.
You need all them it to update any of the elements that may have changed. I might skip the call entirely if you're sure there are no changes, but that's the improvement you suggested.
What i am trying to say is that it is not necessary to send all the contact information, only the code and name.
You need all them it to update any of the elements that may have changed. I might skip the call entirely if you're sure there are no changes, but that's the improvement you suggested.
I mean on creation and update, what i see in the API documentation is that only are required name
and code
, the rest of the contact information is optional for Invoicexpress. Maybe there is something i am not understanding.
It is optional but you still want to provide it so that the data in the Invoice is complete. If you want a different behavior, you can extend the partner prepare values method and implement something different.
It is optional but you still want to provide it so that the data in the Invoice is complete. If you want a different behavior, you can extend the partner prepare values method and implement something different.
Ok, in some cases having the complete invoice on Odoo is sufficient. Thank you for the help and your time :)
/ocabot merge patch