mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-13 08:21:26 +00:00
Add 'consumable' field to Part
- Indicates that a part can be used to make other parts - This is the inverse of 'buildable' - Add this field to the serializer and edit forms - Display parameter on part info page - BOM edit window only requests sub-parts that are marked as 'consumable' - Also added option to edit 'units' field for part
This commit is contained in:
@ -126,9 +126,12 @@ class Part(models.Model):
|
||||
# Units of quantity for this part. Default is "pcs"
|
||||
units = models.CharField(max_length=20, default="pcs", blank=True)
|
||||
|
||||
# Can this part be built?
|
||||
# Can this part be built from other parts?
|
||||
buildable = models.BooleanField(default=False, help_text='Can this part be built from other parts?')
|
||||
|
||||
# Can this part be used to make other parts?
|
||||
consumable = models.BooleanField(default=True, help_text='Can this part be used to build other parts?')
|
||||
|
||||
# Is this part "trackable"?
|
||||
# Trackable parts can have unique instances
|
||||
# which are assigned serial numbers (or batch numbers)
|
||||
|
Reference in New Issue
Block a user