2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Bom export with substitute part numbers (#4203)

* Added BOM export option to export substitute part numbers

* Small documentation fix

* Fixed the behaviour for multiple lines with different amount of substitutes

* Changed UI naming to "alternative parts"
This commit is contained in:
bloemp
2023-01-24 23:35:26 +01:00
committed by GitHub
parent 8316086c61
commit 61e5244789
3 changed files with 46 additions and 3 deletions

View File

@ -330,9 +330,15 @@ function exportBom(part_id, options={}) {
required: true,
min_value: 0,
},
substitute_part_data: {
label: '{% trans "Include Alternative Parts" %}',
help_text: '{% trans "Include alternative parts in exported BOM" %}',
type: 'boolean',
value: inventreeLoad('bom-export-substitute_part_data', false),
},
parameter_data: {
label: '{% trans "Include Parameter Data" %}',
help_text: '{% trans "Include part parameter data in exported BOM" %}',
help_text: '{% trans "Include part parameter data in exported BOM" %}',
type: 'boolean',
value: inventreeLoad('bom-export-parameter_data', false),
},
@ -366,6 +372,7 @@ function exportBom(part_id, options={}) {
// Extract values from the form
var field_names = [
'format', 'cascade', 'levels',
'substitute_part_data',
'parameter_data',
'stock_data',
'manufacturer_data',