Browse Source

Merge pull request #26635 from frappe-pr-bot/backport/version-13-pre-release/26576

fix: included company in link document type filters for contact
develop
rohitwaghchaure 3 years ago
committed by GitHub
parent
commit
f3ae7584c5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      erpnext/hooks.py
  2. 16
      erpnext/public/js/contact.js

3
erpnext/hooks.py

@ -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

@ -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…
Cancel
Save