Hi folks,
I am trying to get logged in user id by using below method. It is working fine whenever I try to create new record.
But not on old records. I see Administrator/OdooBot user in current user id field in old records.
Please help me out to fix this issue.
def get_current_user_id(self):
return self.env.user.id
current_user_id = fields.Many2one('res.users', default=get_current_user_id)