-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't save objects to xero. #103
Comments
btw Library is generating following XML and it seems it's not correct:
|
Hi @aidanlister, I've just tried to replicate this issue and found that the same thing is hapening for me on the latest master. We have an open community thread disscusion here for reference https://community.xero.com/developer/discussion/12184472. Has the serialization process been changed lately that could cause the serializtion to be incorrect? Cheers, |
No intentional changes ... I'll do some bisection and get back to you. |
I added some tests to pick up on the problem: |
There was a PR which fixed this, which is now merged in. |
Relates to freakboy3742#103 and https://community.xero.com/developer/discussion/12184472 If you get a contact (and probably other things), edit the dict and send it straight back, the Xero API will throw a bad request exception with the message "PostDataInvalidException: The element 'HasValidationErrors' was not recognised. Ensure the element name has the correct case and that there are no duplicate elements of the same name."
@aidanlister, I've opened one last PR to help resolve Asav's issue. The PR will also help others tryig to use the Library i the same fashion. PR #105 |
Thanks guys for all the help.
|
Adding the following fields into
Please advise. |
I wonder if something has changed on Xero's end to be more strict? I'll add these too. |
Also getting a similar error when trying to update an invoice:
Any update on that old issue? |
I had same error as @nadzimo and similar solution to previous. When I add "HasAccount" to the pyxero.basemanager.BaseManager.NO_SEND_FIELDS, that PostDataInvalidException goes away |
If someone makes a PR I'll merge it |
It seems xero has a new field in invoices called HasAccount but doesn't want this to be uploaded in the API? Don't send when saving changes. see issue freakboy3742GH-103
There's actually a further issue with (at least one of) the date fields because when the above issue was fixed the API then complained about the date being in the wrong format. Re-saving the datetime to a simple date (in my script not in pyxero) fixed that problem |
I try to do this
but it's throwing this error in both cases.
can someone please help me solve this.
The text was updated successfully, but these errors were encountered: