2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

More 'limit_choices_to' limitations for template parts

This commit is contained in:
Oliver Walters
2019-05-25 23:55:16 +10:00
parent 9c1c008f33
commit c3d75deb16
4 changed files with 43 additions and 1 deletions

View File

@ -188,7 +188,10 @@ class SupplierPart(models.Model):
part = models.ForeignKey('part.Part', on_delete=models.CASCADE,
related_name='supplier_parts',
limit_choices_to={'purchaseable': True},
limit_choices_to={
'purchaseable': True,
'has_variants': False,
},
help_text='Select part',
)