Support length_unit for bundles equally as for cables

This commit is contained in:
KV 2020-11-15 01:29:36 +01:00
parent 8cd3e2dcb7
commit 9801437d77

View File

@ -78,7 +78,7 @@ def generate_bom(harness):
+ (f', {cable.gauge} {cable.gauge_unit}' if cable.gauge else '') + (f', {cable.gauge} {cable.gauge_unit}' if cable.gauge else '')
+ (f', {color}' if color else '')) + (f', {color}' if color else ''))
bom_entries.append({ bom_entries.append({
'item': description, 'qty': cable.length, 'unit': 'm', 'designators': cable.name if cable.show_name else None, 'item': description, 'qty': cable.length, 'unit': cable.length_unit, 'designators': cable.name if cable.show_name else None,
'manufacturer': index_if_list(cable.manufacturer, index), 'manufacturer': index_if_list(cable.manufacturer, index),
'mpn': index_if_list(cable.mpn, index), 'pn': index_if_list(cable.pn, index) 'mpn': index_if_list(cable.mpn, index), 'pn': index_if_list(cable.pn, index)
}) })