Add Data to child table using frappe.get_doc function

Hello,

First of all Erpnext is amazing!!! so kudos to the developer team.
Now coming to my problem. I want to add new record in child table of a doctype using frappe.getdoc() function. for example frappe.getdoc() function is used for creating salary slip from process payroll tool.
similarly if that salary slip has a child table than how its values can be set from process payroll frappe.getdoc() function.

Thanks in Advance…
Regards
Deep T

1 Like

@Deep you can use frappe.model.add_child if you are doing in js.
In python simply pass a list of dict. Just search the code you will find couple of examples.

4 Likes

@neilLasrado Thank you for the reply. That worked as a charm for me… :smile:

2 Likes