fix: validation message of quality inspection in purchase receipt (#25666)
This commit is contained in:
parent
98fc4195b3
commit
2aa401826e
@ -379,8 +379,7 @@ class StockController(AccountsController):
|
||||
link = frappe.utils.get_link_to_form('Quality Inspection', d.quality_inspection)
|
||||
frappe.throw(_("Quality Inspection: {0} is not submitted for the item: {1} in row {2}").format(link, d.item_code, d.idx), QualityInspectionNotSubmittedError)
|
||||
|
||||
qa_failed = any([r.status=="Rejected" for r in qa_doc.readings])
|
||||
if qa_failed:
|
||||
if qa_doc.status != 'Accepted':
|
||||
frappe.throw(_("Row {0}: Quality Inspection rejected for item {1}")
|
||||
.format(d.idx, d.item_code), QualityInspectionRejectedError)
|
||||
elif qa_required :
|
||||
|
@ -27,10 +27,11 @@ class TestQualityInspection(unittest.TestCase):
|
||||
dn.reload()
|
||||
self.assertRaises(QualityInspectionRejectedError, dn.submit)
|
||||
|
||||
frappe.db.set_value("Quality Inspection Reading", {"parent": qa.name}, "status", "Accepted")
|
||||
frappe.db.set_value("Quality Inspection", qa.name, "status", "Accepted")
|
||||
dn.reload()
|
||||
dn.submit()
|
||||
|
||||
qa.reload()
|
||||
qa.cancel()
|
||||
dn.reload()
|
||||
dn.cancel()
|
||||
|
Loading…
x
Reference in New Issue
Block a user