fix: create Quality Inspection button not showing (#47746)

This commit is contained in:
rohitwaghchaure
2025-05-27 12:18:39 +05:30
committed by GitHub
parent 64cb693173
commit d8cb073eaf
3 changed files with 20 additions and 1 deletions

View File

@@ -330,7 +330,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
}
const me = this;
if (!this.frm.is_new() && this.frm.doc.docstatus === 0 && frappe.model.can_create("Quality Inspection") && show_qc_button) {
if (!this.frm.is_new()
&& (this.frm.doc.docstatus === 0 || this.frm.doc.__onload?.allow_to_make_qc_after_submission)
&& frappe.model.can_create("Quality Inspection")
&& show_qc_button) {
this.frm.add_custom_button(__("Quality Inspection(s)"), () => {
me.make_quality_inspection();
}, __("Create"));