How to create a simple HTML table, and load the content from the other doctype?

I have the same problem but with a child document, and i’m not able to solve it.

I have to update an HTML fieldwhere i create a new Purchase Receipt Item doc in a new Purchase receipt document. I use this code:

 frappe.ui.form.on("Purchase Receipt", 
 {
"items_on_form_rendered": function(frm,cdt,cdn)
	{	
frappe.call
    ({
	   method: 'frappe.client.get_list',
	   args:
 	   {
	   doctype: "Purchase Order",
 		   fields: ["*"]
	},
		callback: function(res)
 		{
 			 var template = "<table><tbody>{% for (var row in rows) { %}<tr>{% for (var col in rows[row]) { %}<td>rows[row][col]</td>{% } %}</tr>{% } %}</tbody></table>",
         frm.set_df_property('table_orders', 'options', frappe.render(template, {rows: res.message});
        frm.refresh_field('table_orders');
		}	   })
 
 	} });

But it seems doesn’t work. I think the problem is that the function frm.set_df_property, set only properites of a field in parent document and not in the child, but I don’t know how to set the value for this child field.

Anyone can help me?

Thanks
Alessandro