Commit Graph

18 Commits

Author SHA1 Message Date
Oliver 9bcbaaa5f5 Remove more python2 stuff 2022-05-17 16:57:31 +10:00
Matthias Mair a9cfdf8fdb fix import 2022-05-16 17:52:36 +02:00
Matthias Mair 0f5c03e44c use direct import instead of text for offload 2022-05-16 17:45:51 +02:00
Matthias de6507e918
update translation commands 2022-05-01 22:03:49 +02:00
Oliver c1b408f8a3 Send notification if printing fails
If label printing fails (due to a plugin error) then the user is notified.
2022-03-25 15:57:32 +11:00
Matthias 733fc4b718
forgot that before 2021-12-04 03:46:35 +01:00
Matthias c10841fe0e
and again 2021-12-04 03:44:59 +01:00
Matthias 1ba7110cda
change templates to new way 2021-12-04 02:19:12 +01:00
Matthias 2038c2250d
fix notify_low_stock context 2021-12-02 02:42:57 +01:00
Matthias 25a76d37e7
and PEP again 2021-12-02 00:11:02 +01:00
Matthias 64c01bff82
refactor to use general function 2021-12-01 22:26:43 +01: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