mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 15:11:52 +00:00
fix: set cost_center on RFQ item before submitting in test
The test was mutating an already-submitted RFQ, which raised UpdateAfterSubmitError because cost_center lacks allow_on_submit. Use do_not_submit=True, set cost_center on the draft, save, then submit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -262,9 +262,10 @@ class TestRequestforQuotation(ERPNextTestSuite):
|
||||
self.assertEqual(rfq.items[0].cost_center, "_Test Cost Center - _TC")
|
||||
|
||||
def test_cost_center_flows_from_rfq_to_supplier_quotation(self):
|
||||
rfq = make_request_for_quotation()
|
||||
rfq = make_request_for_quotation(do_not_submit=True)
|
||||
rfq.items[0].cost_center = "_Test Cost Center - _TC"
|
||||
rfq.save()
|
||||
rfq.submit()
|
||||
|
||||
sq = make_supplier_quotation_from_rfq(rfq.name, for_supplier=rfq.get("suppliers")[0].supplier)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user