i want to return true if logged in user valid ..
but still not working
def _hide_working_hours(self):
current_user = fields.Many2one('res.users', 'Current User', default=lambda self: self.env.user.id)
if current_user != id:
return False
else:
return True
working_hours_view = fields.Boolean(computed=_hide_working_hours)
Current logged in user in Odoo: http://learnopenerp.blogspot.com/2018/08/get-current-logged-in-user-id-in-odoo.html