mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-19 06:45:11 +00:00
Co-authored-by: Nishka Gosalia <58264710+nishkagosalia@users.noreply.github.com> Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com> fix: quality inspection item code fetch perm issue (#54121)
This commit is contained in:
@@ -58,6 +58,7 @@ frappe.ui.form.on("Quality Inspection", {
|
|||||||
if (doc.reference_type && doc.reference_name) {
|
if (doc.reference_type && doc.reference_name) {
|
||||||
let filters = {
|
let filters = {
|
||||||
from: doctype,
|
from: doctype,
|
||||||
|
parent_doctype: doc.reference_type,
|
||||||
inspection_type: doc.inspection_type,
|
inspection_type: doc.inspection_type,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -364,10 +364,11 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
from frappe.desk.reportview import get_match_cond
|
from frappe.desk.reportview import get_match_cond
|
||||||
|
|
||||||
from_doctype = cstr(filters.get("from"))
|
from_doctype = cstr(filters.get("from"))
|
||||||
|
parent_doctype = cstr(filters.get("parent_doctype"))
|
||||||
if not from_doctype or not frappe.db.exists("DocType", from_doctype):
|
if not from_doctype or not frappe.db.exists("DocType", from_doctype):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
mcond = get_match_cond(from_doctype)
|
mcond = get_match_cond(parent_doctype or from_doctype)
|
||||||
cond, qi_condition = "", "and (quality_inspection is null or quality_inspection = '')"
|
cond, qi_condition = "", "and (quality_inspection is null or quality_inspection = '')"
|
||||||
|
|
||||||
if filters.get("parent"):
|
if filters.get("parent"):
|
||||||
|
|||||||
Reference in New Issue
Block a user