Skip to content
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 see invoice tracking categories #311

Open
ptav opened this issue Apr 10, 2021 · 1 comment
Open

Can see invoice tracking categories #311

ptav opened this issue Apr 10, 2021 · 1 comment

Comments

@ptav
Copy link

ptav commented Apr 10, 2021

Invoices in my account have tracking categories but when I pull invoices using <Xero class instance>.invoices.all() I cannot see those (LineItems is shown but is an empty list in all cases). I can however pull down the list of categories using trackingcategories.all() and I can see the line items if I pull a single invoice.

How can I retrieve the categories alongside a list of invoices? I can clearly pull one at a time but would be more efficient to do that in one go

Many thanks. I'm new to pyxero (and the Xero API) and any help is greatly appreciated

PTav

@neurocean
Copy link

neurocean commented Apr 28, 2021

I'm running into a similar scenario where invoices.all() returns an empty list for LineItems but .get for an invoice returns all LineItems.

This behaviour is baffling.

Edit: Unfortunately it seems like .all() doesn't support the page parameter. Instead you can do invoices.filter(page=1) in a loop to get all invoices. I can't help but wonder if .all() could be made to support pagination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants