fix: included company in Link Document Type filters for contact (#26576)
(cherry picked from commit cbddedab7b
)
This commit is contained in:
parent
7aa802a073
commit
64454a5dc8
@ -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 = {
|
||||
|
16
erpnext/public/js/contact.js
Normal file
16
erpnext/public/js/contact.js
Normal 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");
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user