r23777 - gnucash/trunk/src/optional/python-bindings - Bug 723051 Implement gncCustomerNextID in Python bindings.
Mike Evans
mikee at code.gnucash.org
Mon Jan 27 08:26:36 EST 2014
Author: mikee
Date: 2014-01-27 08:26:35 -0500 (Mon, 27 Jan 2014)
New Revision: 23777
Trac: http://svn.gnucash.org/trac/changeset/23777
Modified:
gnucash/trunk/src/optional/python-bindings/gnucash_core.i
gnucash/trunk/src/optional/python-bindings/gnucash_core.py
Log:
Bug 723051 Implement gncCustomerNextID in Python bindings.
Alter the SWIG interface file to expose the
gncCustomerNextID in Python and adds a CustomerNextID() function
in the book class similar to the InvoiceNextID and BillNextID function.
Author: Tom Lofts <dev at loftx.co.uk>
Modified: gnucash/trunk/src/optional/python-bindings/gnucash_core.i
===================================================================
--- gnucash/trunk/src/optional/python-bindings/gnucash_core.i 2014-01-27 09:15:44 UTC (rev 23776)
+++ gnucash/trunk/src/optional/python-bindings/gnucash_core.i 2014-01-27 13:26:35 UTC (rev 23777)
@@ -65,6 +65,7 @@
#include "gnc-lot.h"
#include "gnc-numeric.h"
#include "gncCustomer.h"
+#include "gncCustomerP.h"
#include "gncEmployee.h"
#include "gncVendor.h"
#include "gncAddress.h"
@@ -191,6 +192,7 @@
//core business includes
%include <gncOwner.h>
%include <gncCustomer.h>
+%include <gncCustomerP.h>
%include <gncEmployee.h>
%include <gncVendor.h>
%include <gncAddress.h>
Modified: gnucash/trunk/src/optional/python-bindings/gnucash_core.py
===================================================================
--- gnucash/trunk/src/optional/python-bindings/gnucash_core.py 2014-01-27 09:15:44 UTC (rev 23776)
+++ gnucash/trunk/src/optional/python-bindings/gnucash_core.py 2014-01-27 13:26:35 UTC (rev 23777)
@@ -40,7 +40,7 @@
gncInvoiceGetInvoiceFromLot, gncEntryLookup, gncInvoiceLookup, \
gncCustomerLookup, gncVendorLookup, gncJobLookup, gncEmployeeLookup, \
gncTaxTableLookup, gncTaxTableLookupByName, gnc_search_invoice_on_id, \
- gnc_search_customer_on_id, gnc_search_bill_on_id , gnc_search_vendor_on_id, gncInvoiceNextID, \
+ gnc_search_customer_on_id, gnc_search_bill_on_id , gnc_search_vendor_on_id, gncInvoiceNextID, gncCustomerNextID, \
gncTaxTableGetTables
class GnuCashCoreClass(ClassFromFunctions):
@@ -239,8 +239,12 @@
''' Return the next Bill ID. '''
from gnucash.gnucash_core_c import gncInvoiceNextID
return gncInvoiceNextID(self.get_instance(),vendor.GetEndOwner().get_instance()[1])
-
+ def CustomerNextID(self):
+ ''' Return the next Bill ID. '''
+ from gnucash.gnucash_core_c import gncCustomerNextID
+ return gncCustomerNextID(self.get_instance())
+
class GncNumeric(GnuCashCoreClass):
"""Object used by GnuCash to store all numbers. Always consists of a
numerator and denominator.
@@ -735,4 +739,4 @@
class QueryInt32Predicate(GnuCashCoreClass):
pass
-QueryInt32Predicate.add_constructor_and_methods_with_prefix('qof_query_', 'int32_predicate')
\ No newline at end of file
+QueryInt32Predicate.add_constructor_and_methods_with_prefix('qof_query_', 'int32_predicate')
More information about the gnucash-changes
mailing list