odoo-addon-openupgrade-scripts 17.0.1.0.1.356__py3-none-any.whl → 17.0.1.0.1.358__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,12 @@
1
1
  # Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
2
+ # Copyright 2025 Tecnativa - Víctor Martínez
2
3
  # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
4
  import uuid
4
5
 
5
6
  from openupgradelib import openupgrade
6
7
 
8
+ from odoo import Command
9
+
7
10
  _deleted_xml_records = [
8
11
  "hr_attendance.hr_attendance_report_rule_multi_company",
9
12
  "hr_attendance.hr_attendance_rule_attendance_employee",
@@ -52,6 +55,28 @@ def fill_hr_attendance_overtime_hours(env):
52
55
  attendances._compute_overtime_hours()
53
56
 
54
57
 
58
+ def hr_attendance_menus(env):
59
+ group_hr_attendance = env.ref("hr_attendance.group_hr_attendance")
60
+ group_hr_attendance_kiosk = env.ref("hr_attendance.group_hr_attendance_kiosk")
61
+ # Remove the groups of 16.0 from the Attendances menu
62
+ env.ref("hr_attendance.menu_hr_attendance_root").write(
63
+ {
64
+ "groups_id": [
65
+ Command.delete(group_hr_attendance.id),
66
+ Command.delete(group_hr_attendance_kiosk.id),
67
+ ]
68
+ }
69
+ )
70
+ # Remove the groups of 16.0 from the Attendances > Kiosk Mode menu
71
+ env.ref("hr_attendance.menu_hr_attendance_kiosk_no_user_mode").write(
72
+ {
73
+ "groups_id": [
74
+ Command.delete(group_hr_attendance_kiosk.id),
75
+ ]
76
+ }
77
+ )
78
+
79
+
55
80
  @openupgrade.migrate()
56
81
  def migrate(env, version):
57
82
  fill_res_company_hr_attendance_display_overtime(env)
@@ -59,3 +84,4 @@ def migrate(env, version):
59
84
  fill_res_company_attendance_kiosk_key(env)
60
85
  openupgrade.delete_records_safely_by_xml_id(env, _deleted_xml_records)
61
86
  fill_hr_attendance_overtime_hours(env)
87
+ hr_attendance_menus(env)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-openupgrade_scripts
3
- Version: 17.0.1.0.1.356
3
+ Version: 17.0.1.0.1.358
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo>=17.0a,<17.1dev
6
6
  Requires-Dist: openupgradelib
@@ -146,7 +146,7 @@ odoo/addons/openupgrade_scripts/scripts/hr/17.0.1.1/post-migration.py,sha256=qun
146
146
  odoo/addons/openupgrade_scripts/scripts/hr/17.0.1.1/pre-migration.py,sha256=YdaFkte3iGFhb5sbxw2V6U1R9zscVDD6gOrF0tII8_s,4335
147
147
  odoo/addons/openupgrade_scripts/scripts/hr/17.0.1.1/upgrade_analysis.txt,sha256=-4tW82_F8u5kdrEaP2aWHSY29ar5qI0uKWK5QZI4Zws,8063
148
148
  odoo/addons/openupgrade_scripts/scripts/hr/17.0.1.1/upgrade_analysis_work.txt,sha256=IhX4TMtbhnrPG2FrbO_otRpduBtJViyXMtBLf290aYs,9437
149
- odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/post-migration.py,sha256=j_i6wfOSi9bUNSnOxc2vUg7EOGHFBLuAfrKLmq5zIbQ,2070
149
+ odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/post-migration.py,sha256=DbcvAnnLhhPNNkJwkMBo7v6tEqizLPRFnldWYF6RKDk,2935
150
150
  odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/pre-migration.py,sha256=HeEyVVsDQILZh1B3ZcU1iP-hu8ZM8DE6JGRiBVmszjI,2235
151
151
  odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/upgrade_analysis.txt,sha256=ktiyZgjaASUbYSnMG6OdNse9DchedxPqneC7F5W4Vjw,5377
152
152
  odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/upgrade_analysis_work.txt,sha256=2ASviNWmrnkPdAELkHM_9kGoEGhRMU9PjtLP4wK3x4A,6124
@@ -765,7 +765,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/17.0.1.0/upgrade_analysi
765
765
  odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
766
766
  odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
767
767
  odoo/addons/openupgrade_scripts/static/description/index.html,sha256=iV41-zYBM4uvZPuunpcr7bQeRgBaojVsKo_gkeyJyA4,12639
768
- odoo_addon_openupgrade_scripts-17.0.1.0.1.356.dist-info/METADATA,sha256=DdpyL9XpCyhCLxZCRTNcAbOdcZJe4Hx-2i6l4H2dKTE,3786
769
- odoo_addon_openupgrade_scripts-17.0.1.0.1.356.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
770
- odoo_addon_openupgrade_scripts-17.0.1.0.1.356.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
771
- odoo_addon_openupgrade_scripts-17.0.1.0.1.356.dist-info/RECORD,,
768
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.358.dist-info/METADATA,sha256=ZLNnCb5V_t7-x-QYEcAJfW8T-aWSoeG1etoZwG9sZQQ,3786
769
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.358.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
770
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.358.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
771
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.358.dist-info/RECORD,,