Showing Account Name in Journal Entry print fromat

I have following Journal Entry Print Format:
image

I want to separate “Account” column to 2 columns which are :

  • Account Number
  • Account Name

Is there a way to custom my print format to be like that since I don’t find any “Account Name” / “Account Number” in the options:

There are two options:

  1. You can create a custom print format and retrieve the account number from the account.
  2. You can create a custom field in the table for the account number and use the “fetch from” feature to get the account number.

is there any reference how to retrieve the account number from the account? (option 1)

You have to apply like

{% for row in doc.accounts %}
    {{ frappe.db.get_value("Account", row.account, 'account_name') }}
{% endfor %}

Where I should put this script?

Here what my print format looks like:

The only button I can click is “Select Columns”.

In the standard print format, this is not possible. You need to create a new custom print format and implement this scenario using HTML/Jinja. Another option is to modify the existing print format by removing the table and developing the entire details using HTML/Jinja.

I see. noted. understood now. thanks NCP