manasan
1
How could I create a child table item in a New Doc by passing through route_options
or new_doc
I tried
frappe.new_doc('Quotation',{'party_name':'Mark','items':[
{item_code:'USB Dongle'}
]})
But it is only creating the party_name but not the child table entry, How should I do this? Is there any example I could look at?
Hi @manasan
You can do it by get_doc
frappe.get_doc({
'doctype': 'Item',
'item_code': item.item_code,
'item_group': 'M',
'stock_uom': 'Nos',
'is_sales_item': 1,
'valuation_rate': item.rate,
'is_purchase_item': 1,
'taxes' : [{
'item_tax_template': tax_template
`}]
}).insert()
refer documentation Document API
manasan
3
I think you misunderstood my question, I wanna send an entry to the child table in a new doc through route from another document.