GnuCash fec5643+
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 433 of file gnucash_core.py.

Member Function Documentation

◆ BillLookupByID()

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

Definition at line 496 of file gnucash_core.py.

496 def BillLookupByID(self, id):
497 from gnucash.gnucash_business import Bill
498 return self.do_lookup_create_oo_instance(
499 gnc_search_bill_on_id, Bill, id)
500

◆ BillNextID()

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

Definition at line 522 of file gnucash_core.py.

522 def BillNextID(self, vendor):
523 ''' Return the next Bill ID. '''
524 from gnucash.gnucash_core_c import gncInvoiceNextID
525 return gncInvoiceNextID(self.get_instance(),vendor.GetEndOwner().get_instance()[1])
526

◆ CustomerLookup()

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

Definition at line 462 of file gnucash_core.py.

462 def CustomerLookup(self, guid):
463 from gnucash.gnucash_business import Customer
464 return self.do_lookup_create_oo_instance(
465 gncCustomerLookup, Customer, guid.get_instance())
466

◆ CustomerLookupByID()

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

Definition at line 506 of file gnucash_core.py.

506 def CustomerLookupByID(self, id):
507 from gnucash.gnucash_business import Customer
508 return self.do_lookup_create_oo_instance(
509 gnc_search_customer_on_id, Customer, id)
510

◆ CustomerNextID()

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

Definition at line 527 of file gnucash_core.py.

527 def CustomerNextID(self):
528 ''' Return the next Customer ID. '''
529 from gnucash.gnucash_core_c import gncCustomerNextID
530 return gncCustomerNextID(self.get_instance())
531

◆ EmployeeLookup()

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

Definition at line 477 of file gnucash_core.py.

477 def EmployeeLookup(self, guid):
478 from gnucash.gnucash_business import Employee
479 return self.do_lookup_create_oo_instance(
480 gncEmployeeLookup, Employee, guid.get_instance() )
481

◆ EntryLookup()

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

Definition at line 457 of file gnucash_core.py.

457 def EntryLookup(self, guid):
458 from gnucash.gnucash_business import Entry
459 return self.do_lookup_create_oo_instance(
460 gncEntryLookup, Entry, guid.get_instance() )
461

◆ InvoiceLookup()

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

Definition at line 452 of file gnucash_core.py.

452 def InvoiceLookup(self, guid):
453 from gnucash.gnucash_business import Invoice
454 return self.do_lookup_create_oo_instance(
455 gncInvoiceLookup, Invoice, guid.get_instance() )
456

◆ InvoiceLookupByID()

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

Definition at line 501 of file gnucash_core.py.

501 def InvoiceLookupByID(self, id):
502 from gnucash.gnucash_business import Invoice
503 return self.do_lookup_create_oo_instance(
504 gnc_search_invoice_on_id, Invoice, id)
505

◆ InvoiceNextID()

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

Definition at line 516 of file gnucash_core.py.

516 def InvoiceNextID(self, customer):
517 ''' Return the next invoice ID.
518 '''
519 from gnucash.gnucash_core_c import gncInvoiceNextID
520 return gncInvoiceNextID(self.get_instance(),customer.GetEndOwner().get_instance()[1])
521

◆ JobLookup()

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

Definition at line 467 of file gnucash_core.py.

467 def JobLookup(self, guid):
468 from gnucash.gnucash_business import Job
469 return self.do_lookup_create_oo_instance(
470 gncJobLookup, Job, guid.get_instance() )
471

◆ TaxTableGetTables()

python.gnucash_core.Book.TaxTableGetTables (   self)

Definition at line 492 of file gnucash_core.py.

492 def TaxTableGetTables(self):
493 from gnucash.gnucash_business import TaxTable
494 return [ TaxTable(instance=item) for item in gncTaxTableGetTables(self.instance) ]
495

◆ TaxTableLookup()

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

Definition at line 482 of file gnucash_core.py.

482 def TaxTableLookup(self, guid):
483 from gnucash.gnucash_business import TaxTable
484 return self.do_lookup_create_oo_instance(
485 gncTaxTableLookup, TaxTable, guid.get_instance() )
486

◆ TaxTableLookupByName()

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

Definition at line 487 of file gnucash_core.py.

487 def TaxTableLookupByName(self, name):
488 from gnucash.gnucash_business import TaxTable
489 return self.do_lookup_create_oo_instance(
490 gncTaxTableLookupByName, TaxTable, name)
491

◆ VendorLookup()

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

Definition at line 472 of file gnucash_core.py.

472 def VendorLookup(self, guid):
473 from gnucash.gnucash_business import Vendor
474 return self.do_lookup_create_oo_instance(
475 gncVendorLookup, Vendor, guid.get_instance() )
476

◆ VendorLookupByID()

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

Definition at line 511 of file gnucash_core.py.

511 def VendorLookupByID(self, id):
512 from gnucash.gnucash_business import Vendor
513 return self.do_lookup_create_oo_instance(
514 gnc_search_vendor_on_id, Vendor, id)
515

◆ VendorNextID()

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

Definition at line 532 of file gnucash_core.py.

532 def VendorNextID(self):
533 ''' Return the next Vendor ID. '''
534 from gnucash.gnucash_core_c import gncVendorNextID
535 return gncVendorNextID(self.get_instance())
536

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