fix: incorrect bom no. added for non-variant items on variant boms (#26320)

This commit is contained in:
Richard Case
2021-07-05 06:26:34 +01:00
committed by GitHub
parent 22c2d4f118
commit 75fdf79376

View File

@@ -1115,6 +1115,8 @@ def make_variant_bom(source_name, bom_no, item, variant_items, target_doc=None):
},
'BOM Item': {
'doctype': 'BOM Item',
# stop get_mapped_doc copying parent bom_no to children
'field_no_map': ['bom_no'],
'condition': lambda doc: doc.has_variants == 0
},
}, target_doc, postprocess)