fix: Update fieldnames
This commit is contained in:
parent
2ffa4b9ce4
commit
3f015f7142
@ -134,7 +134,7 @@ frappe.ui.form.on("Timesheet", {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
project: function(frm) {
|
parent_project: function(frm) {
|
||||||
set_project_in_timelog(frm);
|
set_project_in_timelog(frm);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -168,8 +168,8 @@ frappe.ui.form.on("Timesheet Detail", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
time_logs_add: function(frm, cdt, cdn) {
|
time_logs_add: function(frm, cdt, cdn) {
|
||||||
if(frm.doc.project) {
|
if(frm.doc.parent_project) {
|
||||||
frappe.model.set_value(cdt, cdn, 'project', frm.doc.project);
|
frappe.model.set_value(cdt, cdn, 'project', frm.doc.parent_project);
|
||||||
}
|
}
|
||||||
|
|
||||||
var $trigger_again = $('.form-grid').find('.grid-row').find('.btn-open-row');
|
var $trigger_again = $('.form-grid').find('.grid-row').find('.btn-open-row');
|
||||||
@ -308,7 +308,9 @@ const set_employee_and_company = function(frm) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function set_project_in_timelog(frm) {
|
function set_project_in_timelog(frm) {
|
||||||
if(frm.doc.project){
|
if(frm.doc.parent_project) {
|
||||||
erpnext.utils.copy_value_in_all_rows(frm.doc, frm.doc.doctype, frm.doc.name, "time_logs", "project");
|
$.each(frm.doc.time_logs || [], function(i, item) {
|
||||||
|
frappe.model.set_value(item.doctype, item.name, "project", frm.doc.parent_project);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user