General Leger: New report, custom field issue

I have added new custom field Description in Journal Entry Account form.

After that I create new report General Ledger With Description with Report Type: Script Report.

script report list

Then I copy all the script from general_ledger (.js, py) to my new files. I added filter for Description in JS file.


In my Py file I add column description in query.



I update these files to my server and run bench migrate command.

I create new journal entry and put the Description in filed.

My new report have Description column in it but with out value.

Please let me know which step I am missing in this process.


Hi, Your custom field is in Journal Entry Account, and your query is on General Ledger. If you want the description to be copied to Legder, you have to hook on the submit of Journal Entry and copy description to GL. BTW there is a remarks field in Journal Entry which is copied by default.

Thanks Ranjith,
Please guide me how to hook on submit Journal entry to GL.


You have to create a custom app and in the hooks file you have to

doc_events = {
“Journal Entry”: {

not sure if you are a developer, please refer app development on frappe.
If you think this requirement is generic consider sending PR to ERPNext.
Best ahead.

Just review this link:
General Ledger Report with custom filed

In the last post the Mr.kxt5258 suggest to check the make_entry method in file.

def make_entry(args, adv_adj, update_outstanding, from_repost=False):
args.update({“doctype”: “GL Entry”})
gle = frappe.get_doc(args)
gle.flags.ignore_permissions = 1
gle.flags.from_repost = from_repost
gle.run_method(“on_update_with_args”, adv_adj, update_outstanding, from_repost)

Is it possible to copy the value of Journal Entry Account Description filed to GL Entry? if yes, how to adjust the above code?


This can’t be done without changing core code because overriding class method is not possible through hook.
As suggested by @Rajith, use remark field.

If you want to modify core code then check make_gl_entries() in

Thanks sanjay,
Remark field in Journal Entry account DocType not present, I add custom field in it with the name of remark and then pass a Journal entry, by doing this it does not copy the remark filed in GL Entry document.


I have added custom filed Description in Journal Entry Account form. Then I append custom filed in make_gl_entries method which is written in file.

“description”: d.description

After execute command bench migrate, I create new Journal entry and check it in my new report, that did not worked, my new report display custom column but with out value.

Today I try bench restart command, and create new entry… surprisingly its worked!


@kietmak. Do u mean that your every account in Journal entry can have differnt description and it will also be shown in General Ledger Report?

Yes, check the below screenshot:


Great. Please consider sending a PR on github