fix __eq__ in Split and Transaction

Compare guids with .Equal() when comparing Split and Transaction instances.
This commit is contained in:
andygoblins
2020-02-09 14:37:06 -06:00
parent 2d907ff495
commit 4502afad4f
3 changed files with 16 additions and 0 deletions

View File

@@ -434,6 +434,9 @@ class Transaction(GnuCashCoreClass):
return self.do_lookup_create_oo_instance(
gncInvoiceGetInvoiceFromTxn, Transaction )
def __eq__(self, other):
return self.Equal(other, True, False, False, False)
def decorate_monetary_list_returning_function(orig_function):
def new_function(self, *args):
"""decorate function that returns list of gnc_monetary to return tuples of GncCommodity and GncNumeric
@@ -461,6 +464,9 @@ class Split(GnuCashCoreClass):
"""
_new_instance = 'xaccMallocSplit'
def __eq__(self, other):
return self.Equal(other, True, False, False)
class Account(GnuCashCoreClass):
"""A GnuCash Account.