mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Adjust SupplierPart supplier foreignkey
- Limit choices to 'is_supplier'
This commit is contained in:
		@@ -400,7 +400,9 @@ class SupplierPart(models.Model):
 | 
				
			|||||||
                             )
 | 
					                             )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    supplier = models.ForeignKey(Company, on_delete=models.CASCADE,
 | 
					    supplier = models.ForeignKey(Company, on_delete=models.CASCADE,
 | 
				
			||||||
                                 related_name='parts')
 | 
					                                 related_name='parts',
 | 
				
			||||||
 | 
					                                 limit_choices_to={'is_supplier': True}
 | 
				
			||||||
 | 
					                                 )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SKU = models.CharField(max_length=100, help_text='Supplier stock keeping unit')
 | 
					    SKU = models.CharField(max_length=100, help_text='Supplier stock keeping unit')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user