2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-30 00:21:34 +00:00
Oliver 1085625af4 [Refactor] Notification plugins (#9735)
* Refactor notification concept

- Notifications handled by plugins

* Cleanup

* Only send email if template provided in context

* Logic cleanup

* Fix log_error call

* Refactor error logging

- Ensure plugin slug is correctly attached
- Consistent format
- Logic fixes

* More robust plugin lookup

* Refactor calls to tringger_notification

* Tweak for build stock notification

* Low stock notification refactor

- Actually *use* the notification system
- Fix for email template

* Check stock only when build is issued

* Updated documentation

* Add PluginUserSetting class

- Allows plugins to define per-user settings

* Add API endpoints for PluginUserSetting model

* Placeholder for user-plugin-settings page

* Refactoring frontend code

* Placeholder panel

* Adds user interface for changing user-specific plugin settings

* Tweaks

* Remove old model

* Update documentation

* Playwright tests

* Update API version

* Fix unit test

* Fix removed arg

* Fixes for email notifications

- Track status of sending notifications
- Add helper "activate" method for plugin class
- Update unit tests

* Fix barcode tests

* More unit test fixes

* Test fixes

* Fix for settings models with extra fields

* Enhance unit test

* Remove old test file

* Check for null target_fnc

* Improve DB query efficiency

- Provide a flat list of active keys to plugin.is_active
- Prevents DB fetching (in certain circumstances)
- Add registry.active_plugins() method

* Bump query limit up for test

- In practice, this API endpoint is ~10 queries

* Handle potential errors

* Increase query limit for API test

* Increase query limit for some tests

* Bump API version

* Tweak unit test

* Tweak unit test

* Increased allowed queries

* fix user plugin settings

* Fix for unit test

* Update debug msg

* Tweak API

* Fix endpoint

* Remove "active plugin keys" code

* Restore previous behaviour

* Fix unit tests

* Tweak unit test

* Update src/backend/InvenTree/build/tasks.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/backend/InvenTree/plugin/base/integration/NotificationMixin.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Func updates

* Format

* Add notification settings

* Refactor plugin settings groups

* Fix func type

* Adjust message

* Additional unit tests

* Additional playwright tests

* Additional playwright test

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-26 13:05:59 +10:00
2025-06-26 16:29:12 +10:00
2025-04-18 19:27:32 +10:00
2022-05-20 13:35:07 +02:00
2025-04-26 10:06:46 +10:00
2025-06-26 08:10:41 +10:00
2024-08-25 13:17:24 +10:00
2024-09-08 09:52:00 +10:00
2024-04-16 08:53:03 +10:00
2025-06-26 09:29:13 +10:00
2024-04-11 21:12:41 +10:00
2025-07-18 00:00:33 +10:00

InvenTree logo

InvenTree

Open Source Inventory Management System

License: MITGitHub tag (latest SemVer) CI Documentation Status Docker Build Netlify Status Performance Testing

OpenSSF Best Practices OpenSSF Scorecard Maintainability Rating

codecov Crowdin GitHub commit activity Docker Pulls

GitHub Org's stars Twitter Follow Subreddit subscribers Mastdon

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. A powerful plugin system provides support for custom applications and extensions.

Check out our website for more details.

🧭 Roadmap

Want to see what we are working on? Check out the roadmap tag and horizon milestone.

🛠️ 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

🧰 Deployment / Getting Started

There are several options to deploy InvenTree.

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

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

Refer to the getting started guide for a full set of installation and setup instructions.

📱 Mobile App

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

🔒 Code of Conduct & Security Policy

The InvenTree project team is committed to providing a safe and welcoming environment for all users. Please read our Code of Conduct for more information.

InvenTree is following industry best practices for security. Our security policy is included in this repo. We provide dedicated security pages on our documentation site.

👋 Contributing

Contributions are welcomed and encouraged. Please help to make this project even better! Refer to the contribution page.

📜 Translation

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

💸 Sponsor

If you use InvenTree and find it to be useful, please consider sponsoring the project.

💎 Acknowledgements

We want to acknowledge PartKeepr as a valuable predecessor and inspiration. Find a full list of used third-party libraries in the license information dialog of your instance.

❤️ Support

This project is supported by the following sponsors:

Martin Löper Oliver Lippert Seth Smith SpaceQuest Ltd Appwrite Cabot Technologies Markus Kasten Jeff Haynes Daniele Viti Islendur Gibeon-NL Motrac Research Timo Scrappe ATLAS2246 Radek Hladik

With ongoing resources provided by:

Built with Depot Servers by Digital Ocean Deploys by Netlify Translation by Crowdin

⚠️ License

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

Description
Open Source Inventory Management System
Readme MIT 655 MiB
Languages
Python 68.7%
TypeScript 29.6%
HTML 0.9%
Shell 0.6%
Dockerfile 0.1%