mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Fixes for low-stock emails
- Include variant stock in test - Improve email template
This commit is contained in:
		@@ -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')
 | 
			
		||||
 
 | 
			
		||||
@@ -24,8 +24,8 @@
 | 
			
		||||
 | 
			
		||||
<tr style="height: 3rem">
 | 
			
		||||
    <td style="text-align: center;">{{ part.full_name }}</td>
 | 
			
		||||
    <td style="text-align: center;">{{ part.total_stock }}</td>
 | 
			
		||||
    <td style="text-align: center;">{{ part.available_stock }}</td>
 | 
			
		||||
    <td style="text-align: center;">{{ part.minimum_stock }}</td>
 | 
			
		||||
    <td style="text-align: center;">{% decimal part.total_stock %}</td>
 | 
			
		||||
    <td style="text-align: center;">{% part.available_stock %}</td>
 | 
			
		||||
    <td style="text-align: center;">{% part.minimum_stock %}</td>
 | 
			
		||||
</tr>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user