tillmo/erpnext-client

provide GUI for editing intermediate data model values of purchase invoices

Opened this issue · 1 comments

tillmo commented

The json value produced by extract_main_info in purchase_invoice.py as an intermediate result shall be editable by the user in order to mitigate inaccuracies of the AI model, before the json is then further processed in parse_invoice_json.
Implement a small GUI that shows the PDF of the invoice (see e.g. evince in read_and_transfer in prerechnung.py) as well as the json value. Allow the user to edit the json, using some editor like this one.

tillmo commented

Here some sample code using jsoneditor:

import jsoneditor
json_value = None
def store_json(json_data: dict):
    global json_value
    json_value = json_data
data = "{1:2 , 3:4}"
jsoneditor.editjson(data,callback=store_json)
print(json_value)