Commit Graph

8 Commits

Author SHA1 Message Date
Oliver
78b1c7a22b Skips some specific steps when importing data
- We need to prevent certain operations from running when we are importing data
- This is to prevent unique database constraints from being violated

- Do not register plugins during data import
- Do not launch notification events
2022-02-03 16:03:46 +11:00
Matthias
d884e62be1
[FR] Confirm to W293
Fixes #2335
2021-11-23 00:28:23 +01:00
Oliver
6db6a70fc2 Add task to check required stock for build order 2021-11-04 13:32:14 +11:00
Oliver
a447e22108 Prevent low-stock notifications from overwhelming users
- Limit to once per day, per part
2021-11-04 01:18:00 +11:00
Oliver
476a1342c1 Improve notification of 'low stock' parts:
- Traverse up the variant tree
- Enable subscription by "category"
2021-11-04 00:28:10 +11:00
Oliver
6f9ac4a850 - Fixes for construct_absolute_url function
- Refactor notification email generation
- Update template file
- Add separate templates folder for email
2021-11-02 00:40:25 +11:00
rocheparadox
76c1e936db Added post_delete hook to StockItem
moved the business logic of 'deciding if a low stock notification has to be sent' to part.tasks
2021-11-01 08:25:59 +05:30
rocheparadox
40da41959b Created part.tasks file and moved notify_low_stock function to the same from InvenTree.tasks. The argument type is changed from StockItem to Part
Added trans to headers of table in email template of low_stock_notification.html

added is_part_low_on_stock() function to the part model to check if the part's stock has fallen below the minimum quantity

used offload_task function to run the low stock notification function asynchronously
2021-10-31 11:26:41 +05:30