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

@@ -70,6 +70,14 @@ class BuyingController(SubcontractingController):
frappe.db.get_single_value("Buying Settings", "backflush_raw_materials_of_subcontract_based_on"),
)
if self.docstatus == 1 and self.doctype in ["Purchase Receipt", "Purchase Invoice"]:
self.set_onload(
"allow_to_make_qc_after_submission",
frappe.db.get_single_value(
"Stock Settings", "allow_to_make_quality_inspection_after_purchase_or_delivery"
),
)
def create_package_for_transfer(self) -> None:
"""Create serial and batch package for Sourece Warehouse in case of inter transfer."""