And that's pretty much the way the GUI works too. BTW do you know about the Doxygen-generated docs for the C API? It's a bit patchy in parts, but there's a ton of useful info. You can build it yourself or use our nightly builds at https://code.gnucash.org/docs/MAINT.
Regards, John Ralls > On Aug 10, 2022, at 5:59 PM, Robert Simmons <rsimmo...@gmail.com> wrote: > > When I'm done with all this, I'm going to contribute new example scripts. > The current documentation for the Python bindings is very excellent. It's > some of the best documentation I've ever seen. It's a pleasure to use and > saves a ton of time. > > Here is the only way that I can find of getting from zero to the job that I > want and then associate that job with an invoice: > > import gnucash > import gnucash.gnucash_business > > def get_jobs(book): > query = gnucash.Query() > query.search_for('gncJob') > query.set_book(book) > job_list = list() > for result in query.run(): > job_list.append(gnucash.gnucash_business.Job(instance=result)) > query.destroy() > return job_list > > The resulting list is objects with the expected methods. You then loop > through them and find the one you're looking for. > _______________________________________________ > gnucash-user mailing list > gnucash-user@gnucash.org > To update your subscription preferences or to unsubscribe: > https://lists.gnucash.org/mailman/listinfo/gnucash-user > ----- > Please remember to CC this list on all your replies. > You can do this by using Reply-To-List or Reply-All. _______________________________________________ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.