File tree 2 files changed +38
-0
lines changed
scripts/hr_attendance/17.0.2.0
2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 39
39
"website_sale_stock_product_configurator" : "website_sale_product_configurator" ,
40
40
# OCA/account-invoicing
41
41
"account_invoice_fiscal_position_update" : "account" ,
42
+ # OCA/hr-attendance
43
+ "hr_attendance_geolocation" : "hr_attendance" ,
42
44
# OCA/l10n-spain
43
45
"l10n_es_irnr" : "l10n_es" ,
44
46
"l10n_es_irnr_sii" : "l10n_es_aeat_sii_oca" ,
Original file line number Diff line number Diff line change 1
1
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
2
+ # Copyright 2024 Tecnativa - Víctor Martínez
2
3
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
4
from openupgradelib import openupgrade
4
5
14
15
]
15
16
16
17
18
+ def _hr_attendance_geolocation (env ):
19
+ """Rename the fields if the hr_attendance_geolocation module was installed."""
20
+ if openupgrade .column_exists (env .cr , "hr_attendance" , "check_in_latitude" ):
21
+ openupgrade .rename_fields (
22
+ env ,
23
+ [
24
+ (
25
+ "hr.attendance" ,
26
+ "hr_attendance" ,
27
+ "check_in_latitude" ,
28
+ "in_latitude" ,
29
+ ),
30
+ (
31
+ "hr.attendance" ,
32
+ "hr_attendance" ,
33
+ "check_in_longitude" ,
34
+ "in_longitude" ,
35
+ ),
36
+ (
37
+ "hr.attendance" ,
38
+ "hr_attendance" ,
39
+ "check_out_latitude" ,
40
+ "out_latitude" ,
41
+ ),
42
+ (
43
+ "hr.attendance" ,
44
+ "hr_attendance" ,
45
+ "check_out_longitude" ,
46
+ "out_longitude" ,
47
+ ),
48
+ ],
49
+ )
50
+
51
+
17
52
def pre_create_hr_attendance_overtime_hours (env ):
18
53
openupgrade .logged_query (
19
54
env .cr ,
@@ -42,5 +77,6 @@ def fill_res_company_attendance_from_systray(env):
42
77
@openupgrade .migrate ()
43
78
def migrate (env , version ):
44
79
openupgrade .rename_xmlids (env .cr , _xmlid_renames )
80
+ _hr_attendance_geolocation (env )
45
81
pre_create_hr_attendance_overtime_hours (env )
46
82
fill_res_company_attendance_from_systray (env )
You can’t perform that action at this time.
0 commit comments