How to add custom field in Salary Register Report

I was trying to setup Salary Register. I have some custom foelds like ESI Number. I need to show it in the Salary Register Report. I tried to add like this in salary_register.py like this :

columns = [
		_("Salary Slip ID") + ":Link/Salary Slip:150",_("Employee") + ":Link/Employee:120", _("Employee Name") + "::140",
		_("Date of Joining") + "::80", _("Branch") + ":Link/Branch:120", _("Department") + ":Link/Department:120",
		_("Designation") + ":Link/Designation:120", _("Company") + ":Link/Company:120", _("Start Date") + "::80",
		_("End Date") + "::80", _("Leave Without Pay") + ":Float:130", _("Payment Days") + ":Float:120", _("ESI Number") + "::120",
	]
	"""
	columns = [
		_("Salary Slip ID") + ":Link/Salary Slip:150",_("Employee") + ":Link/Employee:120", _("Employee Name") + "::140",
		_("Date of Joining") + "::80", _("Branch") + ":Link/Branch:-1", _("Department") + ":Link/Department:-1",
		_("Designation") + ":Link/Designation:-1", _("Company") + ":Link/Company:120", _("Start Date") + "::80",
		_("End Date") + "::80", _("Leave Without Pay") + ":Float:-1", _("Payment Days") + ":Float:120", _("ESI Number") + "::120",
	]

But it is not working. Can you please help me to figure out what i missed in this code ??

Hello,

You can also do this by going to Salary Register Report> Goto Menu>Click on Add Coloums>Select necessary options and click on submit.

Hope this helps.

Regards,
Sujay

1 Like