Hi,
i am writing an Import Script for BOMs with FrappeClient. I read out the following data from a csv File:
- BOM
- BOM Items
- BOM Operations
client = FrappeClient(“xyz”, “Administrator”, “pass_for_admin”)
…
//read out csv and sort the data
//so now I have the following docs
…
bom = {“doctype”: “BOM”, “item”: artNr, “item_name”: desc, “is_active”:0, “is_default”:0, “with_operations”:0}
client.insert(bom)
// I cannot insert the BOM here, because the BOM has no BOM Items - I get the ValidationError “Raw Materials cannot be blank”
bom_operation = {“doctype”: “BOM Operation”, “parent”:bom_name, “workstation”:workstation, “description”: desc, “time_in_mins”: zeit}
client.insert(bom_operation)
bom_item = {“doctype”: “BOM Item”, “parent”:bom_name, “item_code”:matNr, “item_name”: desc, “bom_no”: artNr, “qty”:menge}
client.insert(bom_item)
// I cannot insert the operations and items first, because I have no parent BOM ID
How can this be done ?
Can I insert the BOM without server side validation, to get an valid ID ?
I can only find the insert command in the FrappeClient.
Thank you very much
Tobias