Duplicate Entry on Custom print format

Hi, I am editing a custom print format for Salary Slip and using:

        {% for emp in doc.employee %}
        {% set employee = frappe.get_doc("Employee", emp.employee) %}
        {{ doc.employee_name }}<br />
        {{ employee.current_address }}
        {% endfor %}

to get more info from the employee in the salary slip. it is working and pulls the current_address in this case, but it pulls the address like 100 times duplicated.

Is this a bug, or do I do something wrong?

I am just testing the print format with this string of code mentioned above to see if maybe other elements in the format are messing with it, but the result is the same, duplicated.

ERPNext: v14.10.0 (version-14)
Frappe Framework: v14.18.1 (version-14)

Hi @pronext,

Please directly apply it.

{{ frappe.db.get_value("Employee", doc.employee, 'current_address') }}

Then reload and check it.
The employee’s current address will be shown in salary slip print format.

Thank You!

@NCP Thank you very much, that was working. It is just strange that it workes on another place in the same template with timesheets without any problem.