mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 15:15:42 +00:00 
			
		
		
		
	Overdue order notification (#3114)
* Adds a background task to notify users when a PurchaseOrder becomes overdue * Schedule the overdue purchaseorder check to occur daily * Allow notifications to be sent to "Owner" instances - Extract user information from the Owner instance * add unit test to ensure notifications are sent for overdue purchase orders * Adds notification for overdue sales orders * Clean up notification display panel - Simplify rendering - Order "newest at top" - Element alignment tweaks * style fixes * More style fixes * Tweak notification padding * Fix import order * Adds task to notify user of overdue build orders * Adds unit tests for build order notifications * Refactor subject line for emails: - Use the configured instance title as a prefix for the subject line * Add email template for overdue build orders * Fix unit tests to accommodate new default value * Logic error fix
This commit is contained in:
		@@ -27,7 +27,7 @@ def notify_low_stock(part: part.models.Part):
 | 
			
		||||
        'link': InvenTree.helpers.construct_absolute_url(part.get_absolute_url()),
 | 
			
		||||
        'template': {
 | 
			
		||||
            'html': 'email/low_stock_notification.html',
 | 
			
		||||
            'subject': "[InvenTree] " + name,
 | 
			
		||||
            'subject': name,
 | 
			
		||||
        },
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -44,7 +44,7 @@ class TemplateTagTest(InvenTreeTestCase):
 | 
			
		||||
 | 
			
		||||
    def test_inventree_instance_name(self):
 | 
			
		||||
        """Test the 'instance name' setting"""
 | 
			
		||||
        self.assertEqual(inventree_extras.inventree_instance_name(), 'InvenTree server')
 | 
			
		||||
        self.assertEqual(inventree_extras.inventree_instance_name(), 'InvenTree')
 | 
			
		||||
 | 
			
		||||
    def test_inventree_base_url(self):
 | 
			
		||||
        """Test that the base URL tag returns correctly"""
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user