Patch by Mike E:
The current error feedback to a python scrpt/user looks something like:
call to begin resulted in the following errors, (7,)
This change in gnucash_core.py makes the feedback similar to:
call to begin resulted in the following errors, ERR_BACKEND_LOCKED
This is less cryptic and aid debugging of user python scripts. My only
issue though is whether this would break existing user scripts where checking
of this error code is used for flow control. Although since the ERR_ codes are
imported with gnucash_core_c it *should* have no effect.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19808 57a11ea4-9604-0410-9ed3-97b8803252fd
Patch by Christoph Holtermann:
For the second enhancement proposal i have attached a simple patch which adds
the argument ignore_lock to Session.__init__() which is passed through to
qof_session_begin.
This patch extends the function Session.__init__() with ignore_lock
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19795 57a11ea4-9604-0410-9ed3-97b8803252fd
Patch by Mike E and Mark Jenkins:
When creating or appending to invoices, customers and bills, searching by ID is
likely more useful than by GUID. I've added this functionality to the Python
bindings.
Search by ID using the python code:
tmp = gnucash.gnucash_core_c.search_invoice_on_id(ID,book.instance)
if tmp:
invoice = gnucash.gnucash_business.Invoice(instance=tmp)
Use the invoice object as in sample_scripts/simple_invoice_insert.py
I support this patch, but I've made a few improvments of my own.
I switched up the arguments in search_customer_on_id, search_invoice_on_id,
search_bill_on_id to have Book first and ID second. The reason for this was to
make these functions more consistent with the other functions where a search is
done through a book on a particular attribute.
Also added some specific python bindings support to allow this to be used as
methods of Book: Book.CustomerLookupByID, Book.InvoiceLookupByID,
Book.BillLoookupByID.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19431 57a11ea4-9604-0410-9ed3-97b8803252fd
python_GetNthChild_remove.patch
remove the redundant GetNthChild code, gnc_account_nth_child supported
python_more_GUID.patch
Improve support for GUID
python_better_commodity.patch
* Removed custom __init__ from GncCommodity, not only is it wrong but
the one
from GnuCashCoreClass is just fine.
* Supported the get_table method For Book
* Removed support for direct instantiation of GncCommodityTable. (via
gnc_commodity_table_new() ). Only methods and not the constructor
function are added to the class now. Python binding users can access a
GncCommodityTable instance via Book.get_table() and have no need to use
gnc_commodity_table_new(), which the apis advise is for internal use
only.
python_GncLot.patch
* included gnc-lot.h in gnucash_core.i again
* Made GncLot class use superclass __init__, it doesn't need its own.
python_more_documentation.patch
Documentation strings for many classes, which can be viewed in source
and with python's help() mechanism.
python_business_module_load.patch
load the business module, not the business module specific backend
python_example_scripts.py
example scripts improved, new one added. This new script originally
came from this post:
http://lists.gnucash.org/pipermail/gnucash-devel/2008-July/023618.html
python_authors_update.patch
added Legal Aid Manitoba to credit line for Mark Jenkins
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18291 57a11ea4-9604-0410-9ed3-97b8803252fd
Submitted by Mark Jenkins on 2008-03-25 to gnucash-devel.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17263 57a11ea4-9604-0410-9ed3-97b8803252fd