[17.0][ADD] hr_attendance_work_location - #265
Conversation
|
Nice module @rrebollo, |
Do you mean configurable through the web UI—perhaps as a system parameter that applies to all companies in the same instance—or at the individual company level? I would prefer the system parameter implementation; I think it's more practical. Do you have any use cases that would require the company-level approach? |
984663c to
ebb62d9
Compare
|
Currently, there’s no specific use case for it, but I suggested it to anticipate future needs and more flexible. |
ebb62d9 to
d9a81ae
Compare
We designed it without any coupling. It is the implementer's responsibility to ensure geolocation data is provided, but how that is done falls outside the scope of this addon. In fact, right now we are using the addon you mentioned. |
326f6dc to
85ad48c
Compare
|
|
85ad48c to
51528ad
Compare
51528ad to
7b6461f
Compare
542da7b to
c3c4f93
Compare
|
@hitrosol, the geotolerance feature is now configurable at the company level — a value of zero will disable it. Can you give me your review? |
2496017 to
135b15e
Compare
135b15e to
2a93cc2
Compare
|
Update: After a team member raised a question about how to configure the tolerance for 50 meters, we realized the field was expressed in decimal degrees — not intuitive for end users. We've updated the module so the tolerance is now configured in meters (default: 111m). Internally, the algorithm converts to degrees at runtime. Changes included:
|
2a93cc2 to
ad9e3cb
Compare
… mode - Add intermediate kiosk screen (KioskWorkLocation) after identification - Add agnostic preflight endpoint for any identification method - Add barcode_with_location endpoint for barcode + work location flow - Add kiosk_location_settings endpoint for kiosk config data - Extend manual_selection and systray with work_location_id parameter - Display work location in read-only on greeting screen - Add systray dropdown for work location selection - Add post_init_hook for existing companies - Add configurable work_location_mode, manual_work_location_id, work_location_required @BinhexTeam T20661
3ac9ea2 to
75ed102
Compare
- Fix kiosk_work_location_component import: remove spurious static/src/ prefix (@MODULE/ already maps to MODULE/static/src/) - Replace wildcard in web.assets_backend with explicit systray-only files - Prevents module_loader error on kiosk page
t-att-value on <select> sets the HTML attribute, not the DOM property. Select selection is controlled by the property, so use t-att-selected on each <option> instead.
OWL2 in Odoo 17 does not call patched lifecycle hooks like mounted(). The override was silently never invoked, so kiosk_location_settings RPC never fired, workLocationMode stayed 'automatic', and the work location selector never appeared — causing a work_location_required error on check-in. Also add error notification branch in onWorkLocationConfirm for backend errors (e.g. work_location_required).
…eck-out in kiosk When an employee is checked_in (needs to check-out) and work_location_mode is 'manual', the patched kioskConfirm was calling onManualSelection directly without work_location_id. The backend then returned 'work_location_required' error. Fix by always showing the work_location screen in kioskConfirm when in manual mode, regardless of attendance state. The onWorkLocationConfirm method already passes work_location_id to the backend. Also remove the checked_in early-return in onBarcodeScanned for the same reason.
334cc24 to
847696a
Compare
…e for check-in and check-out
…pcService, drop checking override
…line for transpiler
This pull request introduces the
hr_attendance_work_locationmodule, whichenhances the HR Attendance app by enabling work location tracking for employee
attendance records.
Features:
Automatic mode (GPS): Automatically assigns work locations at check-in
and check-out based on GPS coordinates, with configurable proximity tolerance
(set per company in HR Settings > Attendance, default: 111 meters).
Manual mode (Selector): When set to manual mode, the employee selects
their work location before each check-in and check-out. This works in two
interfaces:
selection, or PIN), an intermediate screen appears where the employee
selects their work location. The location is shown read-only on the
greeting screen after the operation.
the attendance popup and editable before both check-in and check-out.
The selected location is stored in the Check-in Work Location or
Check-out Work Location field on the attendance record accordingly.
Configurable per company: Choose between automatic and manual modes,
set a default work location, and optionally require location selection.
Exclude from attendance: Work locations marked as excluded are never
assigned automatically but remain available for manual selection.