gnucash master: Python bindings. Add function gncVendorNextID, complementary to gncCustomerNextID.

Mike Evans mikee at code.gnucash.org
Thu May 15 09:30:08 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/de1de4f0 (commit)
	from  https://github.com/Gnucash/gnucash/commit/afe76922 (commit)



commit de1de4f0a2799a1b4c44a004921955b17c7648ae
Author: Mike Evans <mikee at millstreamcomputing.co.uk>
Date:   Thu May 15 14:27:27 2014 +0100

    Python bindings.  Add function gncVendorNextID, complementary to
    gncCustomerNextID.

diff --git a/src/optional/python-bindings/gnucash_core.i b/src/optional/python-bindings/gnucash_core.i
index 18c4f11..13aef43 100644
--- a/src/optional/python-bindings/gnucash_core.i
+++ b/src/optional/python-bindings/gnucash_core.i
@@ -68,6 +68,7 @@
 #include "gncCustomerP.h"
 #include "gncEmployee.h"
 #include "gncVendor.h"
+#include "gncVendorP.h"
 #include "gncAddress.h"
 #include "gncBillTerm.h"
 #include "gncOwner.h"
@@ -195,6 +196,7 @@
 %include <gncCustomerP.h>
 %include <gncEmployee.h>
 %include <gncVendor.h>
+%include <gncVendorP.h>
 %include <gncAddress.h>
 %include <gncBillTerm.h>
 %include <gncInvoice.h>
diff --git a/src/optional/python-bindings/gnucash_core.py b/src/optional/python-bindings/gnucash_core.py
index 8244c1d..9d80a36 100644
--- a/src/optional/python-bindings/gnucash_core.py
+++ b/src/optional/python-bindings/gnucash_core.py
@@ -40,8 +40,8 @@ from gnucash_core_c import gncInvoiceLookup, gncInvoiceGetInvoiceFromTxn, \
     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, gncCustomerNextID, \
-    gncTaxTableGetTables
+    gnc_search_customer_on_id, gnc_search_bill_on_id , gnc_search_vendor_on_id, \
+    gncInvoiceNextID, gncCustomerNextID, gncTaxTableGetTables, gncVendorNextID
 
 class GnuCashCoreClass(ClassFromFunctions):
     _module = gnucash_core_c
@@ -243,6 +243,11 @@ class Book(GnuCashCoreClass):
       ''' Return the next Customer ID. '''
       from gnucash.gnucash_core_c import gncCustomerNextID
       return gncCustomerNextID(self.get_instance())
+    
+    def VendorNextID(self):
+      ''' Return the next Vendor ID. '''
+      from gnucash.gnucash_core_c import gncVendorNextID
+      return gncVendorNextID(self.get_instance())
 
 class GncNumeric(GnuCashCoreClass):
     """Object used by GnuCash to store all numbers. Always consists of a



Summary of changes:
 src/optional/python-bindings/gnucash_core.i  | 2 ++
 src/optional/python-bindings/gnucash_core.py | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list