2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 04:00:57 +00:00

Limit choices for Part selection

Based on is_template / virtual / active status
This commit is contained in:
Oliver Walters
2020-03-18 21:28:11 +11:00
parent b2cb41f879
commit 8eaaf62eda
6 changed files with 67 additions and 1 deletions

View File

@ -307,6 +307,7 @@ class StockItem(MPTTModel):
limit_choices_to={
'is_template': False,
'active': True,
'virtual': False
})
supplier_part = models.ForeignKey('company.SupplierPart', blank=True, null=True, on_delete=models.SET_NULL,