Merge pull request #19316 from joelios/develop

fix: Unable to create timesheet from project dashboard
This commit is contained in:
Deepesh Garg 2019-10-31 23:28:13 +05:30 committed by GitHub
commit 3cbd70a1d9
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);