text: // Copyright (c) 2021, TZCODE SRL and contributors
  // For license information, please see license.txt
  
  frappe.ui.form.on('Doctype Comment', {
  	refresh(frm) {
  		frm.trigger("add_custom_button");
  	},
  	add_custom_button(frm){
  		if (!frm.doc.communication)
  			return
  		frm.add_custom_button(frm.doc.reference_name, () => {
  			frappe.set_route("Form", "Item", frm.doc.reference_name)
  		}).addClass("btn-primary");
  
  	}
  });
  