How to ignore permission in report

Hi,

i have a script in that i have columns that are not allowed to current user’s how to show that column in script report with out changing permission

def get_columns():
	# return [_("Item Code") + ":Link/Item:100", _("Item Name") + "::100", _("Description") + "::200",
	# 	_("Item Group") + ":Link/Item Group:100", _("Brand") + ":Link/Brand:100", _("Average Age") + ":Float:100",
	# 	_("Earliest") + ":Int:80", _("Latest") + ":Int:80", _("UOM") + ":Link/UOM:100"]
	return [_("Item Code") + ":Link/Item:100", _("Item Name") + "::100", _("Tenant") + ":Link/Tenant:100", _("Warehouse") + ":Link/Warehouse:100",_("Description") + "::200",
		 _("Batch") + ":Link/Batch:ignore_permission/True:100", _("Average Age") + ":Float:100", _("Available Stock") + ":Float:100",_("Warehouse Section") + ":Data:80",
		_("In Bound Date") + ":Date:80", _("Last Movement") + ":Date:80",_("Current Date") + ":Date:80", _("UOM") + ":Link/UOM:100"]

as you can see i added ignore_permission flag on batch link this is the doctype that i don`t have permission.

how to can i ignrore permission programatically

please help.

you may use access level restrict column do you want to hide in specific user.

@Denmark_Del_Puso thanks for answering

no i want to show report to user’s with specific role. but they will not have permission to doctype batch.

so you mean you need to hide doctype batch with specific role but user can view report ? yes its possible you need to view the doctype and put a permission into batch field in level 1. and all user that has a level 1 can see a batch.

1 Like

@Denmark_Del_Puso

that worked thanks