I am using the below code on custom button on Delivery Note to create a new doc in a custom doctype. @frappe.whitelist()
def make_new_inward(source_name, target_doc=None):
doclist = get_mapped_doc(“Delivery Note”, source_name, {
“Delivery Note”: {
“doctype”: “Inward”,
“field_map”: {
“name”: “delivery_note”
},
“validation”: {
“docstatus”: [“=”, 0]
}
}
}, target_doc)
return doclist
The code fetches all details in the child table except the “Rate” field.
It would be really helpful if anyone can help me in fixing this.