mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-11 07:24:15 +00:00
Adds 'consumable' field to BomItem model (#2890)
* Adds 'consumable' field to BomItem model * Add consumable field to API * Consumable items always count as "allocated" for a build * Add new BOM fields to BOM item checksum calculation * Display 'consumable' status in BOM table * Fix order of database migrations * Update unit tests * Fix for BOM table * Remove "infinite" field from StockItem model - Not used anywhere for functionality - Hidden from the user - Now replaced by the "consumable" concept in the BuildOrder model * Update build order allocation table display * Prevent auto-allocation of stock to consumable BOM items * Ignore consumable BOM items when allocating stock to a build order * Reimplmement "footer" row for BOM table * Fix "can_build" calculation - Ignore "consumable" BOM items * Unrelated typo fix * Tweak BOM table * More visual tweaks to BOM table * Add unit test for consumable field
This commit is contained in:
@ -1640,8 +1640,9 @@ class BomFilter(rest_filters.FilterSet):
|
||||
"""Custom filters for the BOM list."""
|
||||
|
||||
# Boolean filters for BOM item
|
||||
optional = rest_filters.BooleanFilter(label='BOM line is optional')
|
||||
inherited = rest_filters.BooleanFilter(label='BOM line is inherited')
|
||||
optional = rest_filters.BooleanFilter(label='BOM item is optional')
|
||||
consumable = rest_filters.BooleanFilter(label='BOM item is consumable')
|
||||
inherited = rest_filters.BooleanFilter(label='BOM item is inherited')
|
||||
allow_variants = rest_filters.BooleanFilter(label='Variants are allowed')
|
||||
|
||||
# Filters for linked 'part'
|
||||
|
Reference in New Issue
Block a user