tillmo/erpnext-client

Use Google API to parse purchase invoices

Opened this issue · 0 comments

tillmo commented

In prerechnung.py, the method process_inv should send the pdf to Google Document AI Invoice, and parse the resulting json into a Python dictionary into pr['json'].
The credentials for Google should be stored in sg.UserSettings(), see menu.py. Preferably, the credentials stored there should suffice for authentication, such that no extra manual entering of a password or such is necessary. Lines 166-202 provide code fpr entering ERPNext API credentials. There should be similar code for entering Google API credentials.

Possibly, this could be used for storing credentials: https://frappeframework.com/docs/v14/user/en/using_frappe_as_oauth_service https://frappeframework.com/docs/v13/user/en/guides/integration/how_to_set_up_oauth