Re: Submit a payment from somewhere not in the GUI...

2014-11-20 Thread Tom Lofts
Hi Geert, > gncOwnerApplyPayment is one option. The other is > gncInvoiceApplyPayment. The former is the most generic one, the latter > is a convenience function that lets you apply a payment to one > specific invoice. Thanks for this - I'd missed gncInvoiceApplyPayment but it turns out this is

Re: Submit a payment from somewhere not in the GUI...

2014-11-14 Thread Tom Lofts
Hi Allen, As part of some of the work I've been doing to create a REST like API via the Python bindings I've also been trying to make payments via the Python API. I think I've managed to find out how this is intended to be done but can't quite get it to work. The relevant function in the G

Re: Python list all invoices

2014-11-10 Thread Tom Lofts
Hi Christoph, While the query api isn’t available in Python yet, I’ve made some steps towards this for the REST API I’ve been working on. Some of this code is already available in the latest version of Gnucash, mostly in the Python examples directory at https://github.com/Gnucash/gnucash/blob

Re: Python bindings: patch, documentation, examples

2014-01-13 Thread Tom Lofts
Hi Henning, > * Are there any other known/major users of the Python bindings? > * Who is maintaining the Python bindings and is there any roadmap to > improve them? While not a major user of the Python bindings I've contributed a few minor fixes and enhancements so far which are visiable in re

RE: Creating new customer with Python bindings and SQL backend

2013-06-07 Thread Tom Lofts
Hi Jonas, I believe this issue relates to a bug in the Python bindings discussed here: https://bugzilla.gnome.org/show_bug.cgi?id=700197 and resolved Guncash 2.5.2 As the bug relates to one of the Python files you should be able to resolve it by patching the relevent file in your 2.4 installati

RE: Creating GUID

2013-06-05 Thread Tom Lofts
Hi Jonas, This is another recent addition, so again you'll need at least Gnucash 2.5.1. This introduces a GUIDString class which will convert a GUID to a string as follows: guid_sting = 'a3817efd668585e2f4431e2996683fd1' account_guid = gnucash.gnucash_core.GUID() gnucash.gnucash_core.GUIDString

RE: List all customers with Python bindings

2013-06-04 Thread Tom Lofts
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 Pyth

Using GList types as a parameter via the Python bindings

2013-06-01 Thread Tom Lofts
Hi there, As part of some of work I've been doing relating the the Python bindings I've come across a number of functions which take a Glist data type. I was originally attempting to work with the qof_query_add_guid_list_match function, but after encountering difficulties I've been testing w

Re: Development primer?

2013-05-12 Thread Tom Lofts
Am Samstag, 11. Mai 2013, 00:24:22 schrieb Allen S. Rout: Additionally, I want to be able to express from my python such desires as: Enumerate for me the active customers (or customer numbers, or...).. Right now I'm checking customers zero to 10,000 for if (customer == None): .. works, but ick

Re: Python based REST api

2013-04-28 Thread Tom Lofts
hat list. ] On Friday 12 April 2013 09:29:20 Tom Lofts wrote: > Hi Derek, > > On 11/04/13 14:56, Derek Atkins wrote: > > Would you care to donate this as a contribution to the gnucash release, > > perhaps under optional/python-bindings/example_scripts ? > > I&