From 234d35781c58dae0354d842b4bfbc297fa5a0335 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Wed, 1 May 2019 11:48:10 +0530 Subject: [PATCH] fix: Python 3 compatibility fixes import reduce from functools Undefined variable --- .../chart_of_accounts_importer/chart_of_accounts_importer.py | 1 + erpnext/regional/italy/utils.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py index 948be646f98..76efa486f8e 100644 --- a/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py +++ b/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py @@ -3,6 +3,7 @@ # For license information, please see license.txt from __future__ import unicode_literals +from functools import reduce import frappe, csv from frappe import _ from frappe.utils import cstr diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index 876bdcf4593..88e7c3e6f45 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py @@ -292,7 +292,7 @@ def prepare_and_attach_invoice(doc, replace=False): "content": invoice_xml }) _file.save() - return file + return _file @frappe.whitelist() def generate_single_invoice(docname):