Skip to content

Commit aac39b2

Browse files
committed
fix: bom item code getting fg item name on row add
1 parent fc9496a commit aac39b2

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

erpnext/public/js/utils.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,15 @@ frappe.form.link_formatters["Project"] = function (value, doc, df) {
10681068
* @returns {string} - The link value with the added title.
10691069
*/
10701070
function add_link_title(value, doc, df, title_field) {
1071-
if (doc && value && doc[title_field] && doc[title_field] !== value && doc[df.fieldname] === value) {
1071+
if (doc.doctype != df.parent) {
1072+
return "";
1073+
} else if (
1074+
doc &&
1075+
value &&
1076+
doc[title_field] &&
1077+
doc[title_field] !== value &&
1078+
doc[df.fieldname] === value
1079+
) {
10721080
return value + ": " + doc[title_field];
10731081
} else if (!value && doc.doctype && doc[title_field]) {
10741082
return doc[title_field];

0 commit comments

Comments
 (0)