I have two child tables in on docType.
What I wish is to have a trigger that is activated when I want, so I have a check box. When the checkbox is ticked, it triggers my script.
What I want is the script to create a new line in the second child table with data from the first one (easy enough), and remove the row I just selected.
I don’t know how to delete the child table row. What function does this?
For the record: I can’t see an event for the “delete” button that becomes visable after selecting a row.
I do not want to use this button, but to be able to delete the row once the checkbox is active.
Anyone?
I tried doing this (in system console):
ff = frappe.db.sql("SELECT name FROM tablist_chld WHERE product='dsfgethdfymghm';")[0][0]
chld_doc = frappe.get_doc('list_chld', ff)
chld_doc.delete()
but the dsfgethdfymghm
row is still there.