Problem when importing/updating BOM

Hi!
I am new to the Frappe framework as our company is looking into migrating our home-made ERP to ERPNext.

I’m having issues importing BOM for an item :
I have created the item (product) and its 25 items (components that will be in the BOM for the product)
Please note that our BOMs are not multi-level, so there shouldn’t be any difficulty here.
I am then trying to import the BOM for this product via the import tool and here are the problems I’m facing :

  • If I first create the BOM with only one item in it, and then try to UPDATE the BOM via the import tool to add the 24 other components, only the last item from my excel file is imported, replacing the existing line in my BOM. When accessing the BOM page, I see on the log (at the footer) 25 occurrences of :
    You [removed rows for Items, Exploded Items]
    You [added rows for Items, Exploded Items]

  • If I choose “insert new records”, 25 different BOMs with 1 item are created for my product (instead of 1 BOM with 25 items), even though the columns “BOM ID” and the Item are the same for every line.

I first exported the existing BOM to make sure the columns are matching and am using the exported file to import my data.
Do you know what the problem could be?
As our company has roughly 400 products to import, it is impossible to create all BOMs manually.

TL;DR How to import a multi-item BOM via the Import tool?

Thank you!

make sure the following rows of the parent fields is empty other than same content

refer to this pull request

Thanks a lot, it works!
The trick is also to create a new BOM when importing and not try to update existing one, as it fails saying “ID not found”