diff --git a/erpnext/public/js/telephony.js b/erpnext/public/js/telephony.js index b66126c2b8..9548d6c5f3 100644 --- a/erpnext/public/js/telephony.js +++ b/erpnext/public/js/telephony.js @@ -1,11 +1,18 @@ frappe.ui.form.ControlData = frappe.ui.form.ControlData.extend( { make_input() { - if (!this.df.read_only) { - this._super(); - } + this._super(); if (this.df.options == 'Phone') { this.setup_phone(); } + if (this.frm && this.frm.fields_dict) { + Object.values(this.frm.fields_dict).forEach(function(field) { + if (field.df.read_only === 1 && field.df.options === 'Phone' + && field.disp_area.style[0] != 'display' && !field.has_icon) { + field.setup_phone(); + field.has_icon = true; + } + }); + } }, setup_phone() { if (frappe.phone_call.handler) {