mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-12 17:23:38 +00:00
chore: use frappe.model.set_value
(cherry picked from commit 3b27f49d79)
This commit is contained in:
committed by
Mergify
parent
a09b73e65d
commit
e12564daa6
@@ -489,12 +489,16 @@ erpnext.sales_common = {
|
||||
}
|
||||
|
||||
project(doc, cdt, cdn) {
|
||||
var item = frappe.get_doc(cdt, cdn);
|
||||
const item = frappe.get_doc(cdt, cdn);
|
||||
if (item.project) {
|
||||
$.each(this.frm.doc["items"] || [], function (i, other_item) {
|
||||
if (!other_item.project) {
|
||||
other_item.project = item.project;
|
||||
refresh_field("project", other_item.name, other_item.parentfield);
|
||||
frappe.model.set_value(
|
||||
other_item.doctype,
|
||||
other_item.name,
|
||||
"project",
|
||||
item.project
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user