#!/usr/bin/python import db import accounts import transactions # Demonstration of how payments can be scripted. # Eg: Pay 500 from our Current account to the Mortgage account current_account = accounts.getAccountByCode("Current") mortgage_account = accounts.getAccountByCode("Mortgage") # Create a transaction object t = Transaction() t.date = datetime.date.today() t.description = "Mortgage payment" t.reconciled = 0 # Source account t.accountid = current_account.id # Destination account t.otheraccountid = mortgage_account.id # Money deposit = 0 withdrawal = 500 # Do it transactions.createTransaction(t)