In version 12 there is a bug in project timesheets.
To reproduce the problem simply add a timesheet to a project by clicking on the plus sign next to Timesheets in the project dashboard.
A new timesheet will be opened with one timesheet entry detail with the project field prepopulated.
Trying to save the timesheet after filling in the details fails with the error.
Missing Fields
Mandatory fields required in Timesheet
Time Sheets
The prefilled out timesheet detail cannot be deleted.
It yields an error in the console .
console.trace() TypeError: “this.doc is undefined”
refresh_field grid_row.js:588
setup_columns grid_row.js:260
render_row grid_row.js:206
refresh grid_row.js:153
refresh grid.js:236
remove grid_row.js:79
grid_row.js:83:5
remove grid_row.js:83
TypeError: this.doc is undefined
The only way to create a timesheet is to reload the new timesheet page which eliminates the prepopulated timesheet detail.
The user can then add a timesheet detail and save it.
I have done more testing with a fresh install of v12 and the problem exists there.
Switching to devolop branch also has the problem.
If I use demo.erpnext.com and try it I notice that it doesnt prefill the project and doesnt have the problem. Is there a way to disable this pre-populating of the project.