From 48da3b4482cce05f184190bd98263c906913a9ba Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Thu, 30 Dec 2021 13:22:25 -0500 Subject: [PATCH] fix: sider issues --- erpnext/selling/doctype/quotation/quotation.py | 3 ++- erpnext/selling/doctype/quotation/test_quotation.py | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 92b7fee774..a06f0420df 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -51,7 +51,8 @@ class Quotation(SellingController): frappe.throw(_("Valid till date cannot be before transaction date")) def validate_shopping_cart_items(self): - if self.order_type != "Shopping Cart": return + if self.order_type != "Shopping Cart": + return for item in self.items: if not frappe.db.exists("Website Item", {"item_code": item.item_code}): diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index 33d2a81373..d00ee7ad4b 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -131,8 +131,6 @@ class TestQuotation(FrappeTestCase): self.assertRaises(frappe.ValidationError, make_sales_order, quotation.name) def test_shopping_cart_without_website_item(self): - from erpnext.selling.doctype.quotation.quotation import make_sales_order - if frappe.db.exists('Website Item', {'item_code': '_Test Item Home Desktop 100'}): frappe.get_last_doc('Website Item', {'item_code': '_Test Item Home Desktop 100'}).delete()