From 43920530a1b9fa2c4c06512049fcd7970b84d54d Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 15 Nov 2018 12:20:27 +0530 Subject: [PATCH] [Minor] Patch fixes --- erpnext/patches/v11_0/set_missing_gst_hsn_code.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/patches/v11_0/set_missing_gst_hsn_code.py b/erpnext/patches/v11_0/set_missing_gst_hsn_code.py index 9d28a4a3f3..3c2cea2230 100644 --- a/erpnext/patches/v11_0/set_missing_gst_hsn_code.py +++ b/erpnext/patches/v11_0/set_missing_gst_hsn_code.py @@ -36,8 +36,8 @@ def execute(): where dt_item.name in ({rows_name}) """.format(dt=dt, rows_name=", ".join(['%s']*len(transaction_rows_name))), tuple(transaction_rows_name)) - for t in transactions: - print(t.name) - trans_doc = frappe.get_doc(dt, t.name) + parent = set([d.name for d in transactions]) + for t in list(parent): + trans_doc = frappe.get_doc(dt, t) hsnwise_tax = get_itemised_tax_breakup_html(trans_doc) - frappe.db.set_value(dt, t.name, "other_charges_calculation", hsnwise_tax, update_modified=False) \ No newline at end of file + frappe.db.set_value(dt, t, "other_charges_calculation", hsnwise_tax, update_modified=False) \ No newline at end of file