Hi,
The issue might be, you have set some default value for the any of the field in the res.users model. If you take an example there is a many2one field named default company in users form view, and there might be a company named lets say ABCD, by activating the developer mode you can set this company ABCD as default value for newly creating customers.
So once you set this company as default company for the newly creating users and later you delete the company named ABCD from the database, during the new user creation the code will check for the company named ABCD in database and the system will not find it, hence you will get a message that record is not found.
You can see this default values from the user interface from here, keep developer mode activated Settings -> Technical -> Actions -> User -defined defaults, check the default values here for the model res.users and see
Thanks