InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

[FR] Allow identification of stocktake reports on generation

Open hvraven opened this issue 2 years ago • 8 comments

Please verify that this feature request has NOT been suggested before.

  • [X] I checked and didn't find a similar feature request

Problem statement

I want to automate stocktake, but only for specific locations. For this I have written a tiny Python script which uses the API to trigger a stocktake on the location and then waits for the report to show up. Currently this relies on the assumption that only a single report is present on the day, as there is no way of knowing how the report will be named when the stocktake request is posted.

Suggested solution

When posting a stocktake request the response contains the name under which the stocktake will become available.

Describe alternatives you've considered

An option to specify the report name (or a suffix) when requesting a new stocktake report, such that one can check for the existence of a unique and know file name.

Examples of other systems

No response

Do you want to develop this?

  • [X] I want to develop this.

hvraven avatar Oct 25 '23 10:10 hvraven

Something along these lines seems reasonable. I have been considering how the server should support long-running background processes such as report generation, but also:

  • Downloading large dataset
  • Processing upload / import data
  • Printing PDF reports
  • Performing some long-running calculation

Maybe a more general-purpose feedback tool would be worthwhile considering here?

SchrodingersGat avatar Oct 25 '23 11:10 SchrodingersGat

Sounds like a general purpose solution would be good to have, yes. I am not familiar with the codebase, so I am not really sure where to start for something like this.

I assume there is already a job framework which is used to process these jobs. Then it would be "only" a task to provide a method to hand out the job IDs on creation, provide an endpoint to get information about the job status.

One would also have to think about how the generated information should be linked. For the stocktake a URI containing the download link should be good enough, but I am not sure if this is true for all applications.

I am a bit low on time right now, but with some pointers on where to look I would be interested in implementing something.

hvraven avatar Oct 25 '23 13:10 hvraven

This issue seems stale. Please react to show this is still important.

github-actions[bot] avatar Dec 25 '23 11:12 github-actions[bot]

not stale

hvraven avatar Dec 25 '23 19:12 hvraven

This issue seems stale. Please react to show this is still important.

github-actions[bot] avatar Feb 24 '24 11:02 github-actions[bot]

Not stale

Am 24. Februar 2024 12:24:47 MEZ schrieb "github-actions[bot]" @.***>:

This issue seems stale. Please react to show this is still important.

-- Reply to this email directly or view it on GitHub: https://github.com/inventree/InvenTree/issues/5787#issuecomment-1962332856 You are receiving this because you authored the thread.

Message ID: @.***>

hvraven avatar Feb 24 '24 16:02 hvraven

This issue seems stale. Please react to show this is still important.

github-actions[bot] avatar Apr 25 '24 11:04 github-actions[bot]

not stale

hvraven avatar Apr 25 '24 11:04 hvraven

This issue seems stale. Please react to show this is still important.

github-actions[bot] avatar Jun 26 '24 11:06 github-actions[bot]