In list view of a doctype get_indicator is called in every row but I tried to print the value of doc.__unsaved its always undefined. Why? How to check if the row is not yet save?
Hello @rmehta I tried it in journal entry list, quotation list and quotation edit. I think its all doctype. This from /frappe-bench/apps/frappe/frappe/public/js/frappe/model/indicator.js . I just put console.log(doc.__unsaved); in frappe.get_indicator = function(doc, doctype). I always get undefined in doc.__unsaved see screenshoot.
@rmehta I want to but I can not figure it out how to check if the doc is not save in frappe.get_indicator = function(doc, doctype) because doc.__unsaved is undefined. maybe you have a tip?
locals is defined see screenshot for values
doc.doctype has value
locals[doc.doctype] is undefined.
locals[doc.doctype][doc.name] also this one is undefined.
@rmehta doc.doctype has a value we do not have e problem with it. The problem is locals[doc.doctype] is undefined locals variable dic has no “Subject Teacher” element. “Subject Teacher” is the value of doc.doctype