Re: [GNC] Linked Documents on Import

2022-07-25 Thread john
Piecash isn't supported either, because it also doesn't use the GnuCash API to write to the database. The supported way--that works with either the XML or SQL backend--is to use the Guile or Python bindings to the GnuCash libraries. You can also write your program in any compiled language that

Re: [GNC] Linked Documents on Import

2022-07-25 Thread Robert Simmons
I definitely wouldn't expect this to be supported. I did take a look at PieCash and see how it handles working with the "slots" table. There doesn't appear to be any other housekeeping that is done other than the INSERT commands. As long as the INSERTS are properly formed and I'm not doing this wit

Re: [GNC] Linked Documents on Import

2022-07-25 Thread Derek Atkins
You are definitely doing something terrible. You are modifying the database from under GnuCash. That is completely not supported and you may destroy your data. -derek Sent using my mobile device. Please excuse any typos. On July 25, 2022 7:42:04 AM Robert Simmons wrote: This seems to do the tri

Re: [GNC] Linked Documents on Import

2022-07-25 Thread Robert Simmons
I've run this after an import of 19 bills. The "Business Linked Documents" function in the UI is able to successfully run the "Reload and Locate Linked Documents" for all linked documents including the ones created using the kludge. Navigating to each individual bill and clicking on the document li

Re: [GNC] Linked Documents on Import

2022-07-25 Thread Robert Simmons
This seems to do the trick. Not sure if I'm doing something terrible here. I don't recommend you do this unless you know what you're doing (I don't lol). https://gist.github.com/utkonos/1dad74716828c591c9839711fdb12f22 import pathlib import sqlite3 bills = [{'id': '01', 'date_opened': '12/

Re: [GNC] Linked Documents on Import

2022-07-24 Thread Robert Simmons
I don't see anything specific to linked documents in PieCash. I see that the IU menu item "Manage Document Link" calls "gnc_plugin_page_invoice_cmd_link" in gnucash/gnome/gnc-plugin-page-invoice.c This is here: https://github.com/Gnucash/gnucash/blob/bbb4113a5a996dcd7bb3494e0be900b275b49a4f/g

Re: [GNC] Linked Documents on Import

2022-07-24 Thread Geoff
Hi Robert > Is there a way to include the document URI in the import CSV? I don't believe so. > could probably reverse engineer the database queries that are > being made by reading the source code. PieCash may be of interest: https://github.com/sdementen/piecash Regards Geoff = On 25

[GNC] Linked Documents on Import

2022-07-24 Thread Robert Simmons
Please forgive me if this is the wrong place to ask this question. I searched the list and did not see this discussed, so if it was discussed, also please forgive my searching mistake. I have built a Jupyter notebook that parses incoming bills in various forms (some are PDF, some are CSV, and some