What does your post-consume script do? #10950
Replies: 2 comments
-
|
This discussion has been automatically closed due to inactivity. Please see our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently I am working on improving my post-consume script to compensate some features I am missing in Paperless-ngx v2.18.4.
My Questions
My Usage
I want to have an overview of which invoice I have already worked on and when and improve the payment.
My documents are
I got an saved view for open invoices
My custom field
My post-consume script
Extracting Information
This is the trickiest part.. I tried different things.
Regex is still the only option I got somehow working.
I created a list of possible patterns, e.g. invoices numbers
and try to match them with seperators like
:or spaces/tabs:After a while I adjusted for the most typical invoices I got in my monthly/yearly routine.
Filling Custom Fields
The API document is a bit spare concering custom fields.
I got it to work using the endpoint
/api/documents/bulk_edit/and using the parameter fieldI got also a bit tricky I had to do
testbecomesqPjd4A0T7VoNwb5C. I also did a manual lookup for thisUpdating Title
I am a bit sad that I need to update the document title via the post-consume script. I really love that there are the custom fields, but it is frustating that I can't use them to set the title via the WebUI.
Editing the title via bulk_edit is not possible and the endpoint
/api/documents/{doc_pk}is CSRF protected, so I didn't find a way to update the title via the post_consume script. Sadly!Beta Was this translation helpful? Give feedback.
All reactions