odoo-addon-openupgrade-scripts 17.0.1.0.1.388__py3-none-any.whl → 17.0.1.0.1.391__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.
- odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/end-migration.py +43 -0
- odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/post-migration.py +1 -1
- odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/post-migration.py +20 -0
- odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/upgrade_analysis_work.txt +3 -2
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.388.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.391.dist-info}/METADATA +2 -1
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.388.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.391.dist-info}/RECORD +8 -7
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.388.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.391.dist-info}/WHEEL +0 -0
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.388.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.391.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,43 @@
|
|
1
|
+
# Copyright 2025 Le Filament (https://le-filament.com)
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
3
|
+
from openupgradelib import openupgrade
|
4
|
+
|
5
|
+
|
6
|
+
def _assign_journal_xmlids(env):
|
7
|
+
"""
|
8
|
+
Starting in Odoo 17, Odoo expects journals to get external id
|
9
|
+
like account.1_sale for sale journal on company 1
|
10
|
+
We therefore assign xmlids to existing journals so that they will not be recreated
|
11
|
+
"""
|
12
|
+
for company in env["res.company"].search([("chart_template", "!=", False)]):
|
13
|
+
template_data = env["account.chart.template"]._get_chart_template_data(
|
14
|
+
company.chart_template
|
15
|
+
)
|
16
|
+
existing_journals = (
|
17
|
+
env["account.journal"]
|
18
|
+
.with_context(active_test=False)
|
19
|
+
.search(env["account.journal"]._check_company_domain(company), order="id")
|
20
|
+
)
|
21
|
+
for xmlid, journal_data in list(
|
22
|
+
template_data.get("account.journal", {}).items()
|
23
|
+
):
|
24
|
+
if not env.ref(xmlid, raise_if_not_found=False) and "type" in journal_data:
|
25
|
+
journal = existing_journals.filtered(
|
26
|
+
lambda j: j.type == journal_data["type"] # noqa: B023
|
27
|
+
)[:1]
|
28
|
+
if journal:
|
29
|
+
existing_journals -= journal
|
30
|
+
env["ir.model.data"]._update_xmlids(
|
31
|
+
[
|
32
|
+
{
|
33
|
+
"xml_id": f"account.{company.id}_{xmlid}",
|
34
|
+
"record": journal,
|
35
|
+
"noupdate": True,
|
36
|
+
}
|
37
|
+
]
|
38
|
+
)
|
39
|
+
|
40
|
+
|
41
|
+
@openupgrade.migrate()
|
42
|
+
def migrate(env, version):
|
43
|
+
_assign_journal_xmlids(env)
|
@@ -508,7 +508,7 @@ def _map_chart_template_id_to_chart_template(
|
|
508
508
|
`l10n_` prefix removed (usually the country's iso code)
|
509
509
|
"""
|
510
510
|
env.cr.execute(
|
511
|
-
f"""SELECT m.
|
511
|
+
f"""SELECT m.{coa_m2o}, CONCAT(imd.module, '.', imd.name)
|
512
512
|
FROM {model_table} m
|
513
513
|
JOIN ir_model_data imd
|
514
514
|
ON imd.model='account.chart.template'
|
@@ -67,6 +67,16 @@ def hr_attendance_menus(env):
|
|
67
67
|
]
|
68
68
|
}
|
69
69
|
)
|
70
|
+
openupgrade.rename_xmlids(
|
71
|
+
env.cr,
|
72
|
+
[
|
73
|
+
(
|
74
|
+
"hr_attendance.group_hr_attendance",
|
75
|
+
"hr_attendance.group_hr_attendance_own_reader",
|
76
|
+
),
|
77
|
+
],
|
78
|
+
allow_merge=True,
|
79
|
+
)
|
70
80
|
# Remove the groups of 16.0 from the Attendances > Kiosk Mode menu
|
71
81
|
env.ref("hr_attendance.menu_hr_attendance_kiosk_no_user_mode").write(
|
72
82
|
{
|
@@ -75,6 +85,16 @@ def hr_attendance_menus(env):
|
|
75
85
|
]
|
76
86
|
}
|
77
87
|
)
|
88
|
+
openupgrade.rename_xmlids(
|
89
|
+
env.cr,
|
90
|
+
[
|
91
|
+
(
|
92
|
+
"hr_attendance.group_hr_attendance_kiosk",
|
93
|
+
"hr_attendance.group_hr_attendance_own_reader",
|
94
|
+
),
|
95
|
+
],
|
96
|
+
allow_merge=True,
|
97
|
+
)
|
78
98
|
|
79
99
|
|
80
100
|
@openupgrade.migrate()
|
@@ -102,7 +102,8 @@ DEL res.groups: hr_attendance.group_hr_attendance_user
|
|
102
102
|
|
103
103
|
NEW res.groups: hr_attendance.group_hr_attendance_own_reader
|
104
104
|
DEL res.groups: hr_attendance.group_hr_attendance_kiosk
|
105
|
-
# DONE:
|
105
|
+
# DONE: post-migration: merge group
|
106
106
|
|
107
|
+
NEW res.groups: hr_attendance.group_hr_attendance_own_reader
|
107
108
|
DEL res.groups: hr_attendance.group_hr_attendance
|
108
|
-
#
|
109
|
+
# DONE: post-migration: merge group
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-openupgrade_scripts
|
3
|
-
Version: 17.0.1.0.1.
|
3
|
+
Version: 17.0.1.0.1.391
|
4
4
|
Requires-Python: >=3.10
|
5
5
|
Requires-Dist: odoo>=17.0a,<17.1dev
|
6
6
|
Requires-Dist: openupgradelib
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python
|
|
13
13
|
Classifier: Framework :: Odoo
|
14
14
|
Classifier: Framework :: Odoo :: 17.0
|
15
15
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
16
|
+
Description-Content-Type: text/x-rst
|
16
17
|
|
17
18
|
===================
|
18
19
|
Openupgrade Scripts
|
@@ -5,9 +5,10 @@ odoo/addons/openupgrade_scripts/apriori.py,sha256=ulbKsVvogebyVk-Jqh5u0dOmiPcCCT
|
|
5
5
|
odoo/addons/openupgrade_scripts/readme/CONFIGURE.md,sha256=rnx8ADTYzVUB93PIG3Lib0iWBrphSfVRs6RMikklf3M,238
|
6
6
|
odoo/addons/openupgrade_scripts/readme/DESCRIPTION.md,sha256=HPjPs_KluLFMYXPaJcnoneY8BAh-XPwEAP71I7VTTbo,86
|
7
7
|
odoo/addons/openupgrade_scripts/readme/INSTALL.md,sha256=NDKVZRv0J8BTqcSTD7JwUXL_AY-cDJoegn5IUTbEOFk,113
|
8
|
+
odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/end-migration.py,sha256=G6OWCYdYG6u0MqwPDR7oOQKZr1MQshiO_90VvZYiXHA,1714
|
8
9
|
odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/noupdate_changes.xml,sha256=8s62iD--I0CEeBE1C3mAsS9LMCg7Uw3YNwK8WmSfAZw,8531
|
9
10
|
odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/noupdate_changes_work.xml,sha256=eIPxEPrqPOdaH4U2i0ttgP3xB_vLh_GEXqPPZx3lKVU,8751
|
10
|
-
odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/post-migration.py,sha256=
|
11
|
+
odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/post-migration.py,sha256=lER9nl_RNy-FPlSS0ST96Vk_3tAlBWC5NwWyIWkiO2w,21160
|
11
12
|
odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/pre-migration.py,sha256=-oXAlT9Jce4AM5IF8I_moWDw7lCGhcMJe1BOrkuq6hc,8654
|
12
13
|
odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/upgrade_analysis.txt,sha256=hKMBi1_qDpYpzCmdjzh4E7OMIrtLN8ha97bqqK0FTvo,39700
|
13
14
|
odoo/addons/openupgrade_scripts/scripts/account/17.0.1.2/upgrade_analysis_work.txt,sha256=JYdR14ndafoDGFoCkaIv5E94MqwZ46nmG-IEtHg7YjY,44220
|
@@ -151,10 +152,10 @@ odoo/addons/openupgrade_scripts/scripts/hr/17.0.1.1/post-migration.py,sha256=qun
|
|
151
152
|
odoo/addons/openupgrade_scripts/scripts/hr/17.0.1.1/pre-migration.py,sha256=YdaFkte3iGFhb5sbxw2V6U1R9zscVDD6gOrF0tII8_s,4335
|
152
153
|
odoo/addons/openupgrade_scripts/scripts/hr/17.0.1.1/upgrade_analysis.txt,sha256=-4tW82_F8u5kdrEaP2aWHSY29ar5qI0uKWK5QZI4Zws,8063
|
153
154
|
odoo/addons/openupgrade_scripts/scripts/hr/17.0.1.1/upgrade_analysis_work.txt,sha256=IhX4TMtbhnrPG2FrbO_otRpduBtJViyXMtBLf290aYs,9437
|
154
|
-
odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/post-migration.py,sha256=
|
155
|
+
odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/post-migration.py,sha256=uka7N6zFtyaR2y6_ikYuqbi52sFoofraf5wsAuf2pac,3433
|
155
156
|
odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/pre-migration.py,sha256=HeEyVVsDQILZh1B3ZcU1iP-hu8ZM8DE6JGRiBVmszjI,2235
|
156
157
|
odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/upgrade_analysis.txt,sha256=ktiyZgjaASUbYSnMG6OdNse9DchedxPqneC7F5W4Vjw,5377
|
157
|
-
odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/upgrade_analysis_work.txt,sha256=
|
158
|
+
odoo/addons/openupgrade_scripts/scripts/hr_attendance/17.0.2.0/upgrade_analysis_work.txt,sha256=bCYoRcMO1t94WMjvjsv7OhmG5V9GWLVRQ12p9DEv0LE,6205
|
158
159
|
odoo/addons/openupgrade_scripts/scripts/hr_contract/17.0.1.0/noupdate_changes.xml,sha256=1NemwLIilOOpHDoCFdWOx6FPBx4REo_Wvpe5mb1a28A,518
|
159
160
|
odoo/addons/openupgrade_scripts/scripts/hr_contract/17.0.1.0/post-migration.py,sha256=w-j2Hox5aWp8r9Vyo6nufjm1CA496voFhNcpdN0VtyY,306
|
160
161
|
odoo/addons/openupgrade_scripts/scripts/hr_contract/17.0.1.0/upgrade_analysis.txt,sha256=UGFMWkoi2FdlkIYF85f5v3lhF52ahVhnU3WKiW7Figg,1400
|
@@ -783,7 +784,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/17.0.1.0/upgrade_analysi
|
|
783
784
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
784
785
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
785
786
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=iV41-zYBM4uvZPuunpcr7bQeRgBaojVsKo_gkeyJyA4,12639
|
786
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
787
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
788
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
789
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
787
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.391.dist-info/METADATA,sha256=7dvVYI_PvJDt6nPmzmJ5aaYmpu1V7S1DX7IHN2C5l4s,3823
|
788
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.391.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
789
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.391.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
790
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.391.dist-info/RECORD,,
|
File without changes
|