Skip to content

Commit

Permalink
Merge pull request #130 from pboettch/master
Browse files Browse the repository at this point in the history
Support for GnuCash 3.7 database schema
  • Loading branch information
gregwalters committed Oct 8, 2020
2 parents c925e2c + 8e155f3 commit cc29a90
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 @@ -72,6 +72,32 @@
'taxtables': 2,
'transactions': 4,
'vendors': 1,
},
'3.7': {
'Gnucash': 3000001,
'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 @@ -348,7 +374,7 @@ def open_book(sqlite_file=None,
break
else:
raise ValueError("Unsupported table versions")
assert version == "3.0", "This version of piecash only support books from gnucash 3.0.x " \
assert version == "3.0" or version == "3.7", "This version of piecash only support books from gnucash 3.0.x " \
"which is not the case for {}".format(uri_conn)

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

0 comments on commit cc29a90

Please sign in to comment.