Hey there, I have been giving my clients Time Log Batches for a labour breakdown on each invoice, and along with having my partner and I enter notes for each time log. including them on the Time Log Batch as a printable document.
adding a note field in the Time Log Batch Detail, and using cur_frm.add_fetch("time_log", "note", "note"); in Time Log Batch doc allows this, but only when creating a Time Log Batch manually. (adding TL line by line), and not using “Make Time Log Batch”
I’m trying to acheive everything via Custom Script for portability’s sake, but I don’t know if it would be possible to edit the time_log_list from the front-end to allow it. If anybody has had any experience piggy-backing on the get_new_doc function, I would love to hear it.
You can make a hook in your custom app and update Note. Or you can add it to ERPNext, this can be a standard feature and we will be happy to accept a PR.
I tried this on my test bench, adding the note field to time_log_batch.py. The prerequisites being the custom “note” field in Time Log Batch Detail.
However, the “note” field in the time log batch detail doesn’t populate until it’s saved. All other details populate in the draft (Activity type, Time Log, Billable hours).
Originally I thought the key contributing factor to bringing “note” to batch would have been in this part:
I guess this shows how little I understand about the inner-workings of it all. I would love to contribute for a bunch of little things like this. I will submit a PR on that .py if that makes sense still, but it doesn’t render it usable for anybody else without custom fields.
I did add the field for time log batch detail already. It works fantastically, but it only populates the note data in the child table upon validation of the batch