fix: get tags for rfq (#19564)
* fix: get tags for rfq * chore: remove console log
This commit is contained in:
parent
af7fe1937e
commit
1ad2d4a962
@ -134,7 +134,7 @@ frappe.ui.form.on("Request for Quotation",{
|
||||
if (args.search_type === "Tag" && args.tag) {
|
||||
return frappe.call({
|
||||
type: "GET",
|
||||
method: "frappe.desk.tags.get_tagged_docs",
|
||||
method: "frappe.desk.doctype.tag.tag.get_tagged_docs",
|
||||
args: {
|
||||
"doctype": "Supplier",
|
||||
"tag": args.tag
|
||||
|
@ -344,13 +344,9 @@ def get_item_from_material_requests_based_on_supplier(source_name, target_doc =
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_supplier_tag():
|
||||
data = frappe.db.sql("select _user_tags from `tabSupplier`")
|
||||
|
||||
tags = []
|
||||
for tag in data:
|
||||
tags += filter(bool, tag[0].split(","))
|
||||
|
||||
tags = list(set(tags))
|
||||
|
||||
return tags
|
||||
if not frappe.cache().hget("Supplier", "Tags"):
|
||||
filters = {"document_type": "Supplier"}
|
||||
tags = list(set([tag.tag for tag in frappe.get_all("Tag Link", filters=filters, fields=["tag"]) if tag]))
|
||||
frappe.cache().hset("Supplier", "Tags", tags)
|
||||
|
||||
return frappe.cache().hget("Supplier", "Tags")
|
||||
|
Loading…
x
Reference in New Issue
Block a user