

New_book_with_opening_balances.record_opening_balance (original_account, new_account, new_book, opening_balance_per_currency, commodity_tuple)

New_book_with_opening_balances.initialize_split (book, value, account, trans) These slots, there is an explicit mapping between slot names and object types.Replicate the account structure of a book and apply basis opening balances from the original.

Slots of type GUID use the name of the slot to do the conversion back and forth between an object and its guid. : slot=> has key=default-currency and value=Commodity of type slot= has key=myintkey and value=3 of type slot= has key=mystrkey and value=hello of type slot= has key=myboolkey and value=True of type slot= has key=mydatekey and value= of type slot= has key=mydatetimekey and value= 06:40:23.997157 of type slot= has key=mynumerickey and value=12.34567 of type slot=> has key=account and value=Account of type # delete a slot In : del book # delete all slots In : del book # create a key/value in a slot frames (and create them if they do not exist) In : book = "t" # access a slot in frame in whatever notations In : s1 = book In : s2 = book In : s3 = book In : s4 = book In : assert s1 = s2 = s3 = s4 root_account # iterate over all slots In : for k, v in book. slots ) # set slots In : book = 3 In : book = "hello" In : book = True In : book = datetime. In : import datetime, decimal In : book = create_book () # retrieve list of slots In : print ( book. : Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction Transaction # selecting first transaction generated from a scheduled transaction In : tr = įor a given transaction, the following attributes are accessible: In : book = open_book ( gnucash_books + "book_schtx.gnucash", open_if_lock = True ) # all transactions (including transactions part of a scheduled transaction description) In : for tr in book. transactions Out: Įach of these collections can be either iterated or accessed through some indexation or filter mechanism (returnįirst element of collection satisfying some criteria(s)): commodities Out: # accessing all transactions In : book.

accounts Out: # accessing all commodities In : book. In : book = open_book ( gnucash_books + "default_book.gnucash" ) # accessing all accounts In : book. : Account Account Account Account Account Account Account Account Account Account : Commodity In : # get first ten accounts linked to the commodity commo. : Account In : # get the commodity of an account. children ( type = "CASH" ) # select child account by type. children # select child account by index. children ( name = "Assets" ) # select child account by name. : Account Account Account Account Account # accessing children accounts In. root_account # accessing the root_account Out: Account In : # looping through the children accounts of the root_account. In : book = open_book ( gnucash_books + "default_book.gnucash" ) In : book.
