GnuCash c935c2f+
Loading...
Searching...
No Matches
Public Member Functions
python.gnucash_core.Book Class Reference
Inheritance diagram for python.gnucash_core.Book:
python.gnucash_core.GnuCashCoreClass

Public Member Functions

 InvoiceLookup (self, guid)
 
 EntryLookup (self, guid)
 
 CustomerLookup (self, guid)
 
 JobLookup (self, guid)
 
 VendorLookup (self, guid)
 
 EmployeeLookup (self, guid)
 
 TaxTableLookup (self, guid)
 
 TaxTableLookupByName (self, name)
 
 TaxTableGetTables (self)
 
 BillLookupByID (self, id)
 
 InvoiceLookupByID (self, id)
 
 CustomerLookupByID (self, id)
 
 VendorLookupByID (self, id)
 
 InvoiceNextID (self, customer)
 
 BillNextID (self, vendor)
 
 CustomerNextID (self)
 
 VendorNextID (self)
 
- Public Member Functions inherited from python.gnucash_core.GnuCashCoreClass
 do_lookup_create_oo_instance (self, lookup_function, cls, *args)
 

Additional Inherited Members

- Static Protected Attributes inherited from python.gnucash_core.GnuCashCoreClass
 _module = gnucash_core_c
 

Detailed Description

A Book encapsulates all of the GnuCash data, it is the place where
all GnuCash entities (Transaction, Split, Vendor, Invoice...), are
stored. You'll notice that all of the constructors for those entities
need a book to be associated with.

The most common way to get a book is through the book property in the
Session class, that is, create a session that connects to some storage,
such as through 'my_session = Session('file:my_books.xac')', and access
the book via the book property, 'my_session.book'

If you would like to create a Book without any backing storage, call the
Book constructor without any parameters, 'Book()'. You can later merge
such a book into a book with actual store by using merge_init.

Methods of interest
get_root_account -- Returns the root level Account
get_table -- Returns a commodity lookup table, of type GncCommodityTable

Definition at line 414 of file gnucash_core.py.

Member Function Documentation

◆ BillLookupByID()

python.gnucash_core.Book.BillLookupByID (   self,
  id 
)

Definition at line 477 of file gnucash_core.py.

477 def BillLookupByID(self, id):
478 from gnucash.gnucash_business import Bill
479 return self.do_lookup_create_oo_instance(
480 gnc_search_bill_on_id, Bill, id)
481

◆ BillNextID()

python.gnucash_core.Book.BillNextID (   self,
  vendor 
)
 Return the next Bill ID. 

Definition at line 503 of file gnucash_core.py.

503 def BillNextID(self, vendor):
504 ''' Return the next Bill ID. '''
505 from gnucash.gnucash_core_c import gncInvoiceNextID
506 return gncInvoiceNextID(self.get_instance(),vendor.GetEndOwner().get_instance()[1])
507

◆ CustomerLookup()

python.gnucash_core.Book.CustomerLookup (   self,
  guid 
)

Definition at line 443 of file gnucash_core.py.

443 def CustomerLookup(self, guid):
444 from gnucash.gnucash_business import Customer
445 return self.do_lookup_create_oo_instance(
446 gncCustomerLookup, Customer, guid.get_instance())
447

◆ CustomerLookupByID()

python.gnucash_core.Book.CustomerLookupByID (   self,
  id 
)

Definition at line 487 of file gnucash_core.py.

487 def CustomerLookupByID(self, id):
488 from gnucash.gnucash_business import Customer
489 return self.do_lookup_create_oo_instance(
490 gnc_search_customer_on_id, Customer, id)
491

◆ CustomerNextID()

python.gnucash_core.Book.CustomerNextID (   self)
 Return the next Customer ID. 

Definition at line 508 of file gnucash_core.py.

508 def CustomerNextID(self):
509 ''' Return the next Customer ID. '''
510 from gnucash.gnucash_core_c import gncCustomerNextID
511 return gncCustomerNextID(self.get_instance())
512

◆ EmployeeLookup()

python.gnucash_core.Book.EmployeeLookup (   self,
  guid 
)

Definition at line 458 of file gnucash_core.py.

458 def EmployeeLookup(self, guid):
459 from gnucash.gnucash_business import Employee
460 return self.do_lookup_create_oo_instance(
461 gncEmployeeLookup, Employee, guid.get_instance() )
462

◆ EntryLookup()

python.gnucash_core.Book.EntryLookup (   self,
  guid 
)

Definition at line 438 of file gnucash_core.py.

438 def EntryLookup(self, guid):
439 from gnucash.gnucash_business import Entry
440 return self.do_lookup_create_oo_instance(
441 gncEntryLookup, Entry, guid.get_instance() )
442

◆ InvoiceLookup()

python.gnucash_core.Book.InvoiceLookup (   self,
  guid 
)

Definition at line 433 of file gnucash_core.py.

433 def InvoiceLookup(self, guid):
434 from gnucash.gnucash_business import Invoice
435 return self.do_lookup_create_oo_instance(
436 gncInvoiceLookup, Invoice, guid.get_instance() )
437

◆ InvoiceLookupByID()

python.gnucash_core.Book.InvoiceLookupByID (   self,
  id 
)

Definition at line 482 of file gnucash_core.py.

482 def InvoiceLookupByID(self, id):
483 from gnucash.gnucash_business import Invoice
484 return self.do_lookup_create_oo_instance(
485 gnc_search_invoice_on_id, Invoice, id)
486

◆ InvoiceNextID()

python.gnucash_core.Book.InvoiceNextID (   self,
  customer 
)
 Return the next invoice ID.

Definition at line 497 of file gnucash_core.py.

497 def InvoiceNextID(self, customer):
498 ''' Return the next invoice ID.
499 '''
500 from gnucash.gnucash_core_c import gncInvoiceNextID
501 return gncInvoiceNextID(self.get_instance(),customer.GetEndOwner().get_instance()[1])
502

◆ JobLookup()

python.gnucash_core.Book.JobLookup (   self,
  guid 
)

Definition at line 448 of file gnucash_core.py.

448 def JobLookup(self, guid):
449 from gnucash.gnucash_business import Job
450 return self.do_lookup_create_oo_instance(
451 gncJobLookup, Job, guid.get_instance() )
452

◆ TaxTableGetTables()

python.gnucash_core.Book.TaxTableGetTables (   self)

Definition at line 473 of file gnucash_core.py.

473 def TaxTableGetTables(self):
474 from gnucash.gnucash_business import TaxTable
475 return [ TaxTable(instance=item) for item in gncTaxTableGetTables(self.instance) ]
476

◆ TaxTableLookup()

python.gnucash_core.Book.TaxTableLookup (   self,
  guid 
)

Definition at line 463 of file gnucash_core.py.

463 def TaxTableLookup(self, guid):
464 from gnucash.gnucash_business import TaxTable
465 return self.do_lookup_create_oo_instance(
466 gncTaxTableLookup, TaxTable, guid.get_instance() )
467

◆ TaxTableLookupByName()

python.gnucash_core.Book.TaxTableLookupByName (   self,
  name 
)

Definition at line 468 of file gnucash_core.py.

468 def TaxTableLookupByName(self, name):
469 from gnucash.gnucash_business import TaxTable
470 return self.do_lookup_create_oo_instance(
471 gncTaxTableLookupByName, TaxTable, name)
472

◆ VendorLookup()

python.gnucash_core.Book.VendorLookup (   self,
  guid 
)

Definition at line 453 of file gnucash_core.py.

453 def VendorLookup(self, guid):
454 from gnucash.gnucash_business import Vendor
455 return self.do_lookup_create_oo_instance(
456 gncVendorLookup, Vendor, guid.get_instance() )
457

◆ VendorLookupByID()

python.gnucash_core.Book.VendorLookupByID (   self,
  id 
)

Definition at line 492 of file gnucash_core.py.

492 def VendorLookupByID(self, id):
493 from gnucash.gnucash_business import Vendor
494 return self.do_lookup_create_oo_instance(
495 gnc_search_vendor_on_id, Vendor, id)
496

◆ VendorNextID()

python.gnucash_core.Book.VendorNextID (   self)
 Return the next Vendor ID. 

Definition at line 513 of file gnucash_core.py.

513 def VendorNextID(self):
514 ''' Return the next Vendor ID. '''
515 from gnucash.gnucash_core_c import gncVendorNextID
516 return gncVendorNextID(self.get_instance())
517

The documentation for this class was generated from the following file: