You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Administrator user is trying to Check In in the HR Dashboard, gets:
Missing Record
Record does not exist or has been deleted.
(Record: hr.employee(2,), User: 2).
After creating another account, to have user 2. Now, when Administrator(user 1) is checking in, it's showing in the time attendance logs a check in for user 2.
When user 2 to is trying to clock in, returns this:
Missing Record
Record does not exist or has been deleted.
(Record: hr.employee(6,), User: 6)
I tried with a 3rd user and returns this:
Missing Record
Record does not exist or has been deleted.
(Record: hr.employee(7,), User: 7)
All these on Odoo17 with OpenHRMS.
The text was updated successfully, but these errors were encountered:
importpandasaspdfromcollectionsimportdefaultdictfromdatetimeimporttimedelta, datetime, datefromdateutil.relativedeltaimportrelativedeltafrompytzimportutcfromodooimportapi, fields, models, _# from odoo.http import request # Removed based on best practicesfromodoo.toolsimportfloat_utilsimportlogging# Added for logging_logger=logging.getLogger(__name__) # Added for loggingROUNDING_FACTOR=16classHrEmployee(models.Model):
""" Inherit hr.employee to add birthday field and custom methods. """_inherit='hr.employee'birthday=fields.Date(string='Date of Birth', groups="base.group_user",
help="Birthday")
defattendance_manual(self):
_logger.info(f"attendance_manual method called for employee ID: {self.id} - Name: {self.name}") # Logging the employee# The following line is commented out as it's incorrect to use request in the model directly# employee = request.env['hr.employee'].sudo().browse(request.session.uid)self.sudo()._attendance_action_change({
'city': _('Unknown'),
'country_name': _('Unknown'),
'latitude': False,
'longitude': False,
'ip_address': _('Unknown'),
'browser': _('Unknown'),
'mode': 'kiosk'
})
returnself
When Administrator user is trying to Check In in the HR Dashboard, gets:
Missing Record
Record does not exist or has been deleted.
(Record: hr.employee(2,), User: 2).
After creating another account, to have user 2. Now, when Administrator(user 1) is checking in, it's showing in the time attendance logs a check in for user 2.
When user 2 to is trying to clock in, returns this:
Missing Record
Record does not exist or has been deleted.
(Record: hr.employee(6,), User: 6)
I tried with a 3rd user and returns this:
Missing Record
Record does not exist or has been deleted.
(Record: hr.employee(7,), User: 7)
All these on Odoo17 with OpenHRMS.
The text was updated successfully, but these errors were encountered: