mirror of
https://github.com/bringout/oca-hr.git
synced 2026-04-26 18:52:02 +02:00
Reorganized 67 HR-related modules for better structure: - Moved all odoo-bringout-oca-hr-* packages from packages/oca-technical/ - Now organized in dedicated packages/oca-hr/ submodule - Includes attendance, expense, holiday, employee, and contract modules - Maintains all module functionality while improving project organization This creates a cleaner separation between general technical modules and HR-specific functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
973 B
Python
30 lines
973 B
Python
# Copyright 2019 ForgeFlow S.L.
|
|
# Copyright 2023 Tecnativa - Víctor Martínez
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import models
|
|
|
|
|
|
class HrEmployee(models.Model):
|
|
_inherit = "hr.employee"
|
|
|
|
def _attendance_action_change(self):
|
|
res = super()._attendance_action_change()
|
|
latitude = self.env.context.get("latitude", False)
|
|
longitude = self.env.context.get("longitude", False)
|
|
if latitude and longitude:
|
|
if self.attendance_state == "checked_in":
|
|
res.write(
|
|
{
|
|
"check_in_latitude": latitude,
|
|
"check_in_longitude": longitude,
|
|
}
|
|
)
|
|
else:
|
|
res.write(
|
|
{
|
|
"check_out_latitude": latitude,
|
|
"check_out_longitude": longitude,
|
|
}
|
|
)
|
|
return res
|