fix: use kwargs in new_doc (#35497)

To handle https://github.com/frappe/frappe/pull/21190#event-9386089620
This commit is contained in:
Ankush Menat
2023-05-31 12:50:14 +05:30
committed by GitHub
parent bb21c044f6
commit 686685bba0
2 changed files with 2 additions and 2 deletions

View File

@@ -2444,7 +2444,7 @@ def set_order_defaults(
Returns a Sales/Purchase Order Item child item containing the default values
"""
p_doc = frappe.get_doc(parent_doctype, parent_doctype_name)
child_item = frappe.new_doc(child_doctype, p_doc, child_docname)
child_item = frappe.new_doc(child_doctype, parent_doc=p_doc, parentfield=child_docname)
item = frappe.get_doc("Item", trans_item.get("item_code"))
for field in ("item_code", "item_name", "description", "item_group"):