fix: included company in Link Document Type filters for contact (#26576)

(cherry picked from commit cbddedab7b)
This commit is contained in:
Noah Jacob 2021-07-26 12:54:35 +05:30 committed by frappe-pr-bot
parent 7aa802a073
commit 64454a5dc8
2 changed files with 18 additions and 1 deletions

View File

@ -24,7 +24,8 @@ doctype_js = {
"Address": "public/js/address.js",
"Communication": "public/js/communication.js",
"Event": "public/js/event.js",
"Newsletter": "public/js/newsletter.js"
"Newsletter": "public/js/newsletter.js",
"Contact": "public/js/contact.js"
}
override_doctype_class = {

View File

@ -0,0 +1,16 @@
frappe.ui.form.on("Contact", {
refresh(frm) {
frm.set_query('link_doctype', "links", function() {
return {
query: "frappe.contacts.address_and_contact.filter_dynamic_link_doctypes",
filters: {
fieldtype: ["in", ["HTML", "Text Editor"]],
fieldname: ["in", ["contact_html", "company_description"]],
}
};
});
frm.refresh_field("links");
}
});