Python bindings. Add function gncVendorNextID, complementary to

gncCustomerNextID.
This commit is contained in:
Mike Evans 2014-05-15 14:27:27 +01:00
parent f9548652de
commit d85725c080
2 changed files with 9 additions and 2 deletions

View File

@ -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>

View File

@ -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
@ -244,6 +244,11 @@ class Book(GnuCashCoreClass):
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
numerator and denominator.