List all customers with Python bindings
jonas at lippuner.ca
Tue Jun 4 21:30:29 EDT 2013
-----BEGIN PGP SIGNED MESSAGE-----
Thanks a lot for your explanations. I am very glad to see that this is
something that is being developed right now.
Keep up the good work!
- -------- Original Message --------
Subject: Re: List all customers with Python bindings
From: Tom Lofts <dev at loftx.co.uk>
To: jonas at lippuner.ca
Cc: gnucash-devel at gnucash.org
Date: Tue 04 Jun 2013 01:36:56 AM PDT
> Hi Jonas,
> Gnucash uses the Query Object Framework
> (http://svn.gnucash.org/docs/HEAD/group__QOF.html) to return a
> number of customers (or other types of data) and allows various
> conditions to be applied to the data returned.
> Unfortunately I believe this is not completely implemented in the
> Python bindings yet, though I have made a start over the last
> month, so that it is not possible to return the information you
> You'll need to be using the unstable Gnucash release (at least
> 2.5.1), as this has a number of additional functions in the Query
> class you'll need to use. You should then find you can use the
> query = gnucash.Query() query.search_for('gncCustomer')
> query.set_book(book) customers = 
> for result in query.run():
> Which will return you a list of Customer objects if you pass a Book
> Object into query.set_book()
> This code comes from the REST API example at
> which I have been working on so you may find some more help here.
> Kind regards,
> -----Original Message----- From:
> gnucash-devel-bounces+dev=loftx.co.uk at gnucash.org
> [mailto:gnucash-devel-bounces+dev=loftx.co.uk at gnucash.org] On
> Behalf Of Jonas Lippuner Sent: 03 June 2013 09:57 To:
> gnucash-devel at gnucash.org Subject: List all customers with Python
> Dear Developers,
> How do I get a list of all customers (or all vendors, invoices,
> bills etc.) using the Python bindings? I see from examples how I
> can get a specific customer using book.LookupByID, but this
> requires that I know the GUID of the customer.
> Alternatively, is there a way to get a list of all GUIDs? Then I
> can simply go through all of them and filter out the customers...
> Thanks, Jonas
> _______________________________________________ gnucash-devel
> mailing list gnucash-devel at gnucash.org
My email is signed and I encrypt email on request.
To verify my signature or send me encrypted email,
get my public key: http://lippuner.ca/key
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the gnucash-devel