mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-17 03:42:38 +00:00
fix: permission in bom compare tool
(cherry picked from commit e6fdb3702a)
This commit is contained in:
committed by
Mergify
parent
c92cae8003
commit
c3b66bce1e
@@ -96,8 +96,8 @@ erpnext.BOMComparisonTool = class BOMComparisonTool {
|
||||
return `
|
||||
<tr>
|
||||
<td>${frappe.meta.get_label(doctype, fieldname)}</td>
|
||||
<td>${value1}</td>
|
||||
<td>${value2}</td>
|
||||
<td>${frappe.utils.escape_html(cstr(value1))}</td>
|
||||
<td>${frappe.utils.escape_html(cstr(value2))}</td>
|
||||
</tr>
|
||||
`;
|
||||
})
|
||||
@@ -138,13 +138,17 @@ erpnext.BOMComparisonTool = class BOMComparisonTool {
|
||||
.map((change, i) => {
|
||||
let [fieldname, value1, value2] = change;
|
||||
let th =
|
||||
i === 0 ? `<th rowspan="${values_changed.length}">${item_code}</th>` : "";
|
||||
i === 0
|
||||
? `<th rowspan="${values_changed.length}">${frappe.utils.escape_html(
|
||||
cstr(item_code)
|
||||
)}</th>`
|
||||
: "";
|
||||
return `
|
||||
<tr>
|
||||
${th}
|
||||
<td>${frappe.meta.get_label(child_doctype, fieldname)}</td>
|
||||
<td>${value1}</td>
|
||||
<td>${value2}</td>
|
||||
<td>${frappe.utils.escape_html(cstr(value1))}</td>
|
||||
<td>${frappe.utils.escape_html(cstr(value2))}</td>
|
||||
</tr>
|
||||
`;
|
||||
})
|
||||
@@ -177,7 +181,9 @@ erpnext.BOMComparisonTool = class BOMComparisonTool {
|
||||
let html = rows
|
||||
.map((row) => {
|
||||
let [, doc] = row;
|
||||
let cells = fields.map((df) => `<td>${doc[df.fieldname]}</td>`).join("");
|
||||
let cells = fields
|
||||
.map((df) => `<td>${frappe.utils.escape_html(cstr(doc[df.fieldname]))}</td>`)
|
||||
.join("");
|
||||
return `<tr>${cells}</tr>`;
|
||||
})
|
||||
.join("");
|
||||
|
||||
Reference in New Issue
Block a user