I’m trying to get Purchase Order for an existing Material Request in a custom script using frappe.model.get_new_doc("Purchase Order", matReqDoc, <parent_field>, true)
Can someone explain me the third argument <parent_field>. I tried passing “parent”/“items”, none of them are working.
Giving error: TypeError: frappe.meta.docfield_list[doc.doctype] is undefined