2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 10:35:40 +00:00

Fixes for low-stock emails

- Include variant stock in test
- Improve email template
This commit is contained in:
Oliver
2021-11-04 16:15:11 +11:00
parent 3b052e6bce
commit 5ae6241083
2 changed files with 4 additions and 4 deletions

View File

@ -2098,7 +2098,7 @@ class Part(MPTTModel):
Returns True if the total stock for this part is less than the minimum stock level
"""
return self.total_stock <= self.minimum_stock
return self.get_stock_count() <= self.minimum_stock
@receiver(post_save, sender=Part, dispatch_uid='part_post_save_log')