diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 22371f763c..548813ddef 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -64,10 +64,10 @@ class Quotation(SellingController): if not has_web_item: frappe.throw( - _( - "Row #{0}: Item {1} must have a Website Item for Shopping Cart Quotations" - ).format(item.idx, frappe.bold(item.item_code)), - title=_("Unpublished Item") + _("Row #{0}: Item {1} must have a Website Item for Shopping Cart Quotations").format( + item.idx, frappe.bold(item.item_code) + ), + title=_("Unpublished Item"), ) def has_sales_order(self): diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index d00ee7ad4b..6f0b381fc1 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -131,11 +131,11 @@ class TestQuotation(FrappeTestCase): self.assertRaises(frappe.ValidationError, make_sales_order, quotation.name) def test_shopping_cart_without_website_item(self): - 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() + 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() quotation = frappe.copy_doc(test_records[0]) - quotation.order_type = 'Shopping Cart' + quotation.order_type = "Shopping Cart" quotation.valid_till = getdate() self.assertRaises(frappe.ValidationError, quotation.validate)