style: Re-run pre-commit
This commit is contained in:
parent
b848e61954
commit
8d632e9b9c
@ -64,10 +64,10 @@ class Quotation(SellingController):
|
|||||||
|
|
||||||
if not has_web_item:
|
if not has_web_item:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_(
|
_("Row #{0}: Item {1} must have a Website Item for Shopping Cart Quotations").format(
|
||||||
"Row #{0}: Item {1} must have a Website Item for Shopping Cart Quotations"
|
item.idx, frappe.bold(item.item_code)
|
||||||
).format(item.idx, frappe.bold(item.item_code)),
|
),
|
||||||
title=_("Unpublished Item")
|
title=_("Unpublished Item"),
|
||||||
)
|
)
|
||||||
|
|
||||||
def has_sales_order(self):
|
def has_sales_order(self):
|
||||||
|
@ -131,11 +131,11 @@ class TestQuotation(FrappeTestCase):
|
|||||||
self.assertRaises(frappe.ValidationError, make_sales_order, quotation.name)
|
self.assertRaises(frappe.ValidationError, make_sales_order, quotation.name)
|
||||||
|
|
||||||
def test_shopping_cart_without_website_item(self):
|
def test_shopping_cart_without_website_item(self):
|
||||||
if frappe.db.exists('Website Item', {'item_code': '_Test Item Home Desktop 100'}):
|
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()
|
frappe.get_last_doc("Website Item", {"item_code": "_Test Item Home Desktop 100"}).delete()
|
||||||
|
|
||||||
quotation = frappe.copy_doc(test_records[0])
|
quotation = frappe.copy_doc(test_records[0])
|
||||||
quotation.order_type = 'Shopping Cart'
|
quotation.order_type = "Shopping Cart"
|
||||||
quotation.valid_till = getdate()
|
quotation.valid_till = getdate()
|
||||||
self.assertRaises(frappe.ValidationError, quotation.validate)
|
self.assertRaises(frappe.ValidationError, quotation.validate)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user