mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-13 08:21:26 +00:00
Limit supplierpart part link to purchasable parts only
This commit is contained in:
@ -458,7 +458,9 @@ class SupplierPart(models.Model):
|
||||
# Link to an actual part
|
||||
# The part will have a field 'supplier_parts' which links to the supplier part options
|
||||
part = models.ForeignKey(Part, on_delete=models.CASCADE,
|
||||
related_name='supplier_parts')
|
||||
related_name='supplier_parts',
|
||||
limit_choices_to={'purchasable': True},
|
||||
)
|
||||
|
||||
supplier = models.ForeignKey(Company, on_delete=models.CASCADE,
|
||||
related_name='parts')
|
||||
|
Reference in New Issue
Block a user