Go to file
Oliver 0f445ea6e4
[Feature] Stocktake reports (#4345)
* Add settings to control upcoming stocktake features

* Adds migration for "cost range" when performing stocktake

* Add cost data to PartStocktakeSerializer

Implement a new custom serializer for currency data type

* Refactor existing currency serializers

* Update stocktake table and forms

* Prevent trailing zeroes in forms

* Calculate cost range when adding manual stocktake entry

* Display interactive chart for part stocktake history

* Ensure chart data are converted to common currency

* Adds new model for building stocktake reports

* Add admin integration for new model

* Adds API endpoint to expose list of stocktake reports available for download

- No ability to edit or delete via API

* Add setting to control automated deletion of old stocktake reports

* Updates for settings page

- Load part stocktake report table
- Refactor function to render a downloadable media file
- Fix bug with forcing files to be downloaded
- Split js code into separate templates
- Make use of onPanelLoad functionalitty

* Fix conflicting migration files

* Adds API endpoint for manual generation of stocktake report

* Offload task to generate new stocktake report

* Adds python function to perform stocktake on a single part instance

* Small bug fixes

* Various tweaks

- Prevent new stocktake models from triggering plugin events when created
- Construct a simple csv dataset

* Generate new report

* Updates for report generation

- Prefetch related data
- Add extra columns
- Keep track of stocktake instances (for saving to database later on)

* Updates:

- Add confirmation message
- Serializer validation checks

* Ensure that background worker is running before manually scheduling a new stocktake report

* Add extra fields to stocktake models

Also move code from part/models.py to part/tasks.py

* Add 'part_count' to PartStocktakeReport table

* Updates for stocktake generation

- remove old performStocktake javascript code
- Now handled by automated server-side calculation
- Generate report for a single part

* Add a new "role" for stocktake

- Allows fine-grained control on viewing / creating / deleting stocktake data
- More in-line with existing permission controls
- Remove STOCKTAKE_OWNER setting

* Add serializer field to limit stocktake report to particular locations

* Use location restriction when generating a stocktake report

* Add UI buttons to perform stocktake for a whole category tree

* Add button to perform stocktake report for a location tree

* Adds a background tasks to handle periodic generation of stocktake reports

- Reports are generated at fixed intervals
- Deletes old reports after certain number of days

* Implement notifications for new stocktake reports

- If manually requested by a user, notify that user
- Cleanup notification table
- Amend PartStocktakeModel for better notification rendering

* Hide buttons on location and category page if stocktake is not enabled

* Cleanup log messages during server start

* Extend functionality of RoleRequired permission mixin

- Allow 'role_required' attribute to be added to an API view
- Useful when using a serializer class that does not have a model defined

* Add boolean option to toggle whether a report will be generated

* Update generateStocktake function

* Improve location filtering

- Don't limit the actual stock items
- Instead, select only parts which exist within a given location tree

* Update API version

* String tweaks

* Fix permissions for PartStocktake API

* More unit testing for stocktake functionality

* QoL fix

* Fix for assigning inherited permissions
2023-02-17 11:42:48 +11:00
.devcontainer Fix typos/naming (#4242) 2023-01-25 09:29:50 +11:00
.github Rewording templates (#4235) 2023-01-25 09:31:35 +11:00
.vscode vscode devcontainer (#3474) 2022-08-09 16:06:32 +10:00
ci Use github token for version check (#4092) 2022-12-21 23:00:23 +11:00
contrib [BUG] Quick Installer: INVENTREE_DB_PORT errors (#4224) 2023-01-25 09:31:55 +11:00
deploy fix endline 2022-05-20 13:35:07 +02:00
docker [Feature] Stocktake reports (#4345) 2023-02-17 11:42:48 +11:00
images/logo Export large version of the logo 2020-05-12 00:06:26 +10:00
InvenTree [Feature] Stocktake reports (#4345) 2023-02-17 11:42:48 +11:00
.eslintrc.yml lots of linting fixes for JS files 2021-09-03 22:54:17 +10:00
.gitattributes fix endline 2022-05-20 13:35:07 +02:00
.gitignore Add unit test for deleting part which has pricing information (#3986) 2022-12-13 11:07:35 +11:00
.gitpod.yml Add db an media backups (#3783) 2022-10-17 00:09:31 +11:00
.pkgr.yml Add cli to package installs (#4274) 2023-01-29 12:39:27 +11:00
.pre-commit-config.yaml Dep updates (#4176) 2023-01-09 08:23:43 +11:00
CONTRIBUTING.md Update issue templates to GH forms (#3495) 2022-08-08 11:12:52 +10:00
crowdin.yml L10 merge (#1595) 2021-05-18 19:20:24 +10:00
docker-compose.yml Fix for docker-compose v1 (#3434) 2022-07-30 11:43:15 +10:00
docker.dev.env update INVENTREE_LOG_LEVEL param (#4058) 2022-12-14 07:17:24 +11:00
Dockerfile add libwebp-dev dependency (fixes #4269) (#4335) 2023-02-12 07:10:48 +11:00
LICENSE Update LICENSE 2022-02-21 22:31:10 +11:00
package-lock.json Bump minimatch from 3.0.4 to 3.1.2 (#3912) 2022-11-11 14:38:43 +11:00
package.json prefix version in package 2021-12-02 11:33:02 +01:00
Procfile Add cli to package installs (#4274) 2023-01-29 12:39:27 +11:00
README.md Update installer path (#4305) 2023-02-05 10:56:33 +11:00
RELEASE.md Fix typos/naming (#4242) 2023-01-25 09:29:50 +11:00
requirements-dev.in Requirements fix (#3280) 2022-07-02 21:01:01 +10:00
requirements-dev.txt Dep updates (#4176) 2023-01-09 08:23:43 +11:00
requirements.in Django q sentry (#4296) 2023-02-03 07:14:37 +11:00
requirements.txt Django q sentry (#4296) 2023-02-03 07:14:37 +11:00
runtime.txt Add package-based install method (#3743) 2022-10-16 10:14:18 +11:00
SECURITY.md Spelling fix: dates -> days (#3193) 2022-06-14 10:07:48 +10:00
setup.cfg Add more checks to pre-commit (#3132) 2022-06-06 08:56:52 +10:00
tasks.py Configuration options for dbbackup (#4190) 2023-01-10 07:54:25 +11:00

InvenTree logo

InvenTree

Open Source Inventory Management System

License: MITGitHub tag (latest SemVer) CI Docker Build

Coveralls Crowdin GitHub commit activity Docker Pulls

GitHub Org's stars Twitter Follow Subreddit subscribers

View Demo · Documentation · Report Bug · Request Feature

🌟 About the Project

InvenTree is an open-source Inventory Management System which provides powerful low-level stock control and part tracking. The core of the InvenTree system is a Python/Django database backend which provides an admin interface (web-based) and a REST API for interaction with external interfaces and applications.

InvenTree is designed to be lightweight and easy to use for SME or hobbyist applications, where many existing stock management solutions are bloated and cumbersome to use. Updating stock is a single-action process and does not require a complex system of work orders or stock transactions.

Powerful business logic works in the background to ensure that stock tracking history is maintained, and users have ready access to stock level information.

🎯 Features

  • Organize Parts and BOMs
  • Manage Suppliers
  • Instant Stock Knowledge
  • Extend and Customize to fit your usage

🧭 Roadmap

  • Plugins
  • Improved Importers
  • Custom Workflow Processes

🛠️ Integration

InvenTree is designed to be extensible, and provides multiple options for integration with external applications or addition of custom plugins:

👾 Tech Stack

Server
Database
Client
DevOps

🧰 Getting Started

Refer to the getting started guide for installation and setup instructions.

📱 Mobile App

InvenTree is supported by a companion mobile app which allows users access to stock control information and functionality.

🚋 Deploy

There are several options to deploy InvenTree.

Single line install - read the docs for supported distros and details about the function:

wget -Oq install.sh https://get.inventree.org && bash install.sh

👋 Contributing

Contributions are welcomed and encouraged. Please help to make this project even better! Refer to the contribution page in the docs and check out contributing.md.

📜 Translation

Native language translation of the InvenTree web application is community contributed via crowdin. Contributions are welcomed and encouraged.

To contribute to the translation effort, navigate to the InvenTree crowdin project, create a free account, and start making translations suggestions for your language of choice!

💸 Sponsor

If you use InvenTree and find it to be useful, please consider making a donation toward its continued development.

Donate via PayPal

💎 Acknowledgements

We would like to acknowledge a few special projects:

Find a full list of used third-party libraries in our documentation.

⚠️ License

Distributed under the MIT License. See LICENSE.txt for more information.