mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +00:00
Add similar auto field capabilities to build order
This commit is contained in:
@ -311,9 +311,12 @@ class BuildAllocationItemSerializer(serializers.Serializer):
|
||||
|
||||
build = self.context['build']
|
||||
|
||||
# TODO: Fix this validation - allow for variants and substitutes!
|
||||
"""
|
||||
# BomItem must point to the same 'part' as the parent build
|
||||
if build.part != bom_item.part:
|
||||
raise ValidationError(_("bom_item.part must point to the same part as the build order"))
|
||||
"""
|
||||
|
||||
return bom_item
|
||||
|
||||
|
@ -523,6 +523,10 @@ $('#allocate-selected-items').click(function() {
|
||||
|
||||
var bom_items = $("#allocation-table-untracked").bootstrapTable("getSelections");
|
||||
|
||||
if (bom_items.length == 0) {
|
||||
bom_items = $("#allocation-table-untracked").bootstrapTable('getData');
|
||||
}
|
||||
|
||||
allocateStockToBuild(
|
||||
{{ build.pk }},
|
||||
{{ build.part.pk }},
|
||||
|
Reference in New Issue
Block a user