fix: linking of time_log to timesheet from project (frappe/erpnext #19315 )

This commit is contained in:
joelios 2019-10-15 15:42:51 +02:00 committed by GitHub
parent c269c68727
commit 441720df75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,9 @@ frappe.ui.form.on("Project", {
// add a new row and set the project
let time_log = frappe.model.get_new_doc('Timesheet Detail');
time_log.project = frm.doc.name;
time_log.parent = new_doc.name;
time_log.parentfield = 'time_logs';
time_log.parenttype = 'Timesheet';
new_doc.time_logs = [time_log];
frappe.ui.form.make_quick_entry(doctype, null, null, new_doc);