chore: use frappe.model.set_value

This commit is contained in:
SowmyaArunachalam
2026-01-27 11:36:51 +05:30
parent 9e51701e2a
commit 3b27f49d79

View File

@@ -496,12 +496,16 @@ erpnext.sales_common = {
} }
project(doc, cdt, cdn) { project(doc, cdt, cdn) {
var item = frappe.get_doc(cdt, cdn); const item = frappe.get_doc(cdt, cdn);
if (item.project) { if (item.project) {
$.each(this.frm.doc["items"] || [], function (i, other_item) { $.each(this.frm.doc["items"] || [], function (i, other_item) {
if (!other_item.project) { if (!other_item.project) {
other_item.project = item.project; frappe.model.set_value(
refresh_field("project", other_item.name, other_item.parentfield); other_item.doctype,
other_item.name,
"project",
item.project
);
} }
}); });
} }