Skip to content

Commit

Permalink
Merge pull request #138 from sdementen/issue_136
Browse files Browse the repository at this point in the history
Fixing #136, adding support for GnuCash 4.1
  • Loading branch information
gregwalters committed Oct 8, 2020
2 parents cc29a90 + ddf2850 commit a4e3180
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion piecash/core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,32 @@
'taxtables': 2,
'transactions': 4,
'vendors': 1,
},
'4.1': {
'Gnucash': 4000001,
'Gnucash-Resave': 19920,
'accounts': 1,
'billterms': 2,
'books': 1,
'budget_amounts': 1,
'budgets': 1,
'commodities': 1,
'customers': 2,
'employees': 2,
'entries': 4,
'invoices': 4,
'jobs': 1,
'lots': 2,
'orders': 1,
'prices': 3,
'recurrences': 2,
'schedxactions': 1,
'slots': 4,
'splits': 5,
'taxtable_entries': 3,
'taxtables': 2,
'transactions': 4,
'vendors': 1,
}
}

Expand Down Expand Up @@ -374,7 +400,7 @@ def open_book(sqlite_file=None,
break
else:
raise ValueError("Unsupported table versions")
assert version == "3.0" or version == "3.7", "This version of piecash only support books from gnucash 3.0.x " \
assert version == "3.0" or version == "3.7" or version == "4.1", "This version of piecash only support books from gnucash (3.0|3.7|4.1) " \
"which is not the case for {}".format(uri_conn)

book = s.query(Book).one()
Expand Down

0 comments on commit a4e3180

Please sign in to comment.