Hi Guys,
I want to display Supplier and PO-Number, when i did mouse over on label of respective doctype.
I have doctype with below labels:
1) Last Purchase Price
2) Max PurchasePrice In Last 180Days
3) Min PurchasePrice In Last 180Days
when i did mouse over on any one of (or) all labels, It has to display Supplier and PO-Number.
Please find the attached screen shot…
Hii @Sangram
I tried with below code:
Its working for alert only.
frappe.ui.form.on(cur_frm.doctype, {
‘onload_post_render’: function(frm, cdt, cdn) {
frm.fields_dict.item.grid.wrapper.on('mouseover', 'input[data-fieldname="last_purchase_price"][data-doctype="Pre Purchase Order Item"]', function(e) {
alert("event::" + e.type);
//var d = frappe.get_(cdt, cdn)
//var d = locals[cdt][cdn];
alert(cur_frm.get_field("item").grid.grid_rows[0].doc.last_supplier);
alert(cur_frm.get_field("item").grid.grid_rows[0].doc.po_number);
});
}
});
Note:
Instead of alert, I have to implement ToolTip concept.
Can you suggest any sample code to implement ToolTip.