I want to modify script to hide draft status on timesheet

can anyone tell me how to fetch timesheet doc owner from timesheet doc

here in given script i want to put condion like timesheetdoc owner == frappe.session.user

so that timesheet whose having status draft it is visible to those who has created

other should not see even manager also if status is draft

user = frappe.session.user

#employee = frappe.db.get_value(‘Employee’,{“user_id”:frappe.session.user},‘name’)

if user == “Administrator”:
pass

elif “owner = user” :
conditions = “status = '” + ‘Draft’ + “'”

else:
conditions = “owner = '” + user + “’ OR custom_timesheet_approver = '” + user + “'”