Skip to content

Commit

Permalink
[hr_attendance_ip_check] bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchel Admin authored and sonhd91 committed Aug 13, 2024
1 parent 7524fc9 commit ad2bad8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hr_attendance_ip_check/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Mint System GmbH, Odoo Community Association (OCA)",
"website": "https://www.mint-system.ch",
"category": "Technical",
"version": "15.0.1.0.0",
"version": "15.0.1.1.0",
"license": "AGPL-3",
"depends": ["hr_attendance"],
"data": ["views/attendance_cidr.xml", "security/ir.model.access.csv"],
Expand Down
3 changes: 1 addition & 2 deletions hr_attendance_ip_check/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ def _attendance_ip_check(self):

# Get remote ip
ip_address = ipaddress.IPv4Address(request.httprequest.environ['REMOTE_ADDR'])
# _logger.warning(ip_address)

# Get cidrs from employee
employee_cidrs = self.attendance_cidr_ids
employee_cidrs = self.sudo().attendance_cidr_ids

# Get single check cidrs
allowed_cidrs = employee_cidrs.filtered('single_check')[:1]
Expand Down

0 comments on commit ad2bad8

Please sign in to comment.