Commit Graph

17 Commits

Author SHA1 Message Date
Christian Stimming
7c76425cbf Bug #637346: Adding python-bindings to doxygen documentation
Patch by Christoph Holtermann.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19956 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-17 20:36:40 +00:00
Mike Evans
81a4a8108c Support for GncCommodityNamespace, better support for GncCommodity, and example
enhancements.
Patch supplied my Mark Jenkins.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19955 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-17 14:00:52 +00:00
Mike Evans
a44d515bbb Change indent to 4 sp
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19942 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-15 12:07:14 +00:00
Mike Evans
e1fcfe0269 Add commodity price functions to bindings.
See Bug 636457 for more details.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19916 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-08 11:52:22 +00:00
John Ralls
0e9049458c Make arguments to Session.__init__() have the same order as to qof_session_begin() to reduce potential confusion.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19812 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-11-15 19:10:19 +00:00
Christian Stimming
807d195242 Bug #634812: Improve backend error reporting for Session begin
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
2010-11-14 13:30:16 +00:00
John Ralls
72a014d5c9 Add force_new parameter to GnuCashCoreClass.__init__, reflecting change to qof_session_begin() in r19798
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19801 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-11-12 18:37:59 +00:00
Christian Stimming
76da42522e Bug #634165: Better dealing with a locked database in python
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
2010-11-10 19:49:21 +00:00
Geert Janssens
4099500af1 Add vendor search to python bindings and refactors files gncIDSearch.c/h with vendor search.
Patch by Mike Evans.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19522 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-08-31 17:06:21 +00:00
Christian Stimming
5fbfa23dbb Bug #625193: Added 'search by ID' in python binding for invoices, customers and bills.
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
2010-08-14 20:48:18 +00:00
Geert Janssens
fe928cda93 Bug 625976 - Python Bindings Patch for Transaction.GetImbalance(), patch by Mark Jenkins
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19401 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-08-04 21:11:11 +00:00
Christian Stimming
1fcdfe70d2 Add missing return value specification of lookup_by_code() in python bindings.
Patch by Daniele Varrazzo.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19383 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-07-29 20:16:08 +00:00
Geert Janssens
eb66cdcb2b Python bindings, gncnumeric and accounttype constants, patch by Mark Jenkins.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19315 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-06-30 19:29:39 +00:00
Geert Janssens
9e6d8fb1e9 Bug #622523 - Python bindings are crash prone when linked to guile
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19294 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-06-25 11:06:29 +00:00
Phil Longstaff
f229f9ac8e Python bindings patches by Mark Jenkins.
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
2009-09-05 00:11:31 +00:00
Christian Stimming
bd145a3416 Updated python bindings (r17263) for the gnucash API as of 2008-06-06.
Copied from http://savannah.nongnu.org/projects/python-gnucash.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17284 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-07-07 21:11:02 +00:00
Christian Stimming
4fa2e87962 Python bindings for the gnucash API.
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
2008-07-07 19:18:26 +00:00