test: over ordering of quotation items

(cherry picked from commit 53e58f6678)
This commit is contained in:
Mihir Kandoi
2026-02-02 09:51:09 +05:30
committed by Mergify
parent 19c1dcc3dd
commit 42d873f1d9

View File

@@ -991,6 +991,16 @@ class TestQuotation(IntegrationTestCase):
f"Expected conversion rate {expected_rate}, got {quotation.conversion_rate}",
)
def test_over_order_limit(self):
quotation = make_quotation(qty=5)
so1 = make_sales_order(quotation.name)
so2 = make_sales_order(quotation.name)
so1.delivery_date = nowdate()
so2.delivery_date = nowdate()
so1.submit()
self.assertRaises(frappe.ValidationError, so2.submit)
def enable_calculate_bundle_price(enable=1):
selling_settings = frappe.get_doc("Selling Settings")