fix: sider issues

This commit is contained in:
Devin Slauenwhite 2021-12-30 13:22:25 -05:00 committed by marination
parent b88d5d135e
commit 48da3b4482
2 changed files with 2 additions and 3 deletions

View File

@ -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}):

View File

@ -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()