Show cable color in BOM similar to wires and connectors

This commit is contained in:
KV 2021-02-07 20:50:01 +01:00
parent a4e301e227
commit 0a40a30548

View File

@ -66,7 +66,8 @@ def generate_bom(harness):
+ (f', {cable.type}' if cable.type else '') + (f', {cable.type}' if cable.type else '')
+ (f', {cable.wirecount}') + (f', {cable.wirecount}')
+ (f' x {cable.gauge} {cable.gauge_unit}' if cable.gauge else ' wires') + (f' x {cable.gauge} {cable.gauge_unit}' if cable.gauge else ' wires')
+ (' shielded' if cable.shield else '')) + ( ' shielded' if cable.shield else '')
+ (f', {translate_color(cable.color, harness.options.color_mode)}' if cable.color else ''))
bom_entries.append({ bom_entries.append({
'item': description, 'qty': cable.length, 'unit': cable.length_unit, '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': cable.manufacturer, 'mpn': cable.mpn, 'pn': cable.pn 'manufacturer': cable.manufacturer, 'mpn': cable.mpn, 'pn': cable.pn