From 27e4e244b6dbf4ce242a2c92b380c191c06e827d Mon Sep 17 00:00:00 2001 From: Shreya Date: Wed, 2 May 2018 14:14:14 +0530 Subject: [PATCH] fix codacy --- .../allowed_to_transact_with/allowed_to_transact_with.py | 1 - erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py b/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py index c4ab3b0961..a3e4bbcd09 100644 --- a/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py +++ b/erpnext/accounts/doctype/allowed_to_transact_with/allowed_to_transact_with.py @@ -3,7 +3,6 @@ # For license information, please see license.txt from __future__ import unicode_literals -import frappe from frappe.model.document import Document class AllowedToTransactWith(Document): diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 115cf14119..17e45ac971 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -2,7 +2,7 @@ # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals -import frappe, erpnext, json +import frappe, erpnext import frappe.defaults from frappe.utils import cint, flt from frappe import _, msgprint, throw @@ -1043,7 +1043,7 @@ def get_inter_company_details(doc, doctype): company = frappe.db.get_value("Supplier", {"name": doc.supplier}, "represents_company") return { - "party": party, + "party": party, "company": company } @@ -1073,8 +1073,6 @@ def make_inter_company_purchase_invoice(source_name, target_doc=None): return make_inter_company_invoice("Sales Invoice", source_name, target_doc) def make_inter_company_invoice(doctype, source_name, target_doc=None): - - from frappe.model.mapper import get_mapped_doc if doctype == "Sales Invoice": source_doc = frappe.get_doc("Sales Invoice", source_name) target_doctype = "Purchase Invoice"