r23763 - gnucash/trunk/src/optional/python-bindings - Bug 677489 - Critical error reported when initializing an Invoice

Geert Janssens gjanssens at code.gnucash.org
Sat Jan 25 05:13:55 EST 2014


Author: gjanssens
Date: 2014-01-25 05:13:55 -0500 (Sat, 25 Jan 2014)
New Revision: 23763
Trac: http://svn.gnucash.org/trac/changeset/23763

Modified:
   gnucash/trunk/src/optional/python-bindings/gnucash_business.py
Log:
Bug 677489 - Critical error reported when initializing an Invoice

Apply BeginEdit() and CommitEdit() functions in Invoice class to resolve invoice creation issue.

Author: Tom Lofts <dev at loftx.co.uk>

Modified: gnucash/trunk/src/optional/python-bindings/gnucash_business.py
===================================================================
--- gnucash/trunk/src/optional/python-bindings/gnucash_business.py	2014-01-25 03:42:12 UTC (rev 23762)
+++ gnucash/trunk/src/optional/python-bindings/gnucash_business.py	2014-01-25 10:13:55 UTC (rev 23763)
@@ -159,12 +159,14 @@
                     "with either a book, id, currency and owner, or an existing"
                     "low level swig proxy in the argument instance")
             GnuCashCoreClass.__init__(self, book)
+            self.BeginEdit()
             self.SetID(id)
             self.SetCurrency(currency)
             self.SetOwner(owner)
             if date_opened == None:
                 date_opened = datetime.date.today()
             self.SetDateOpened(date_opened)
+            self.CommitEdit()
         else:
             GnuCashCoreClass.__init__(self, instance=instance)
 



More information about the gnucash-changes mailing list