odoo-addon-openupgrade-scripts 16.0.1.0.3.306__py3-none-any.whl → 16.0.1.0.3.308__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/mail/16.0.1.10/pre-migration.py +68 -0
- odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/post-migration.py +21 -0
- odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/pre-migration.py +16 -0
- odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/upgrade_analysis_work.txt +2 -1
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.306.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.308.dist-info}/METADATA +2 -2
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.306.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.308.dist-info}/RECORD +8 -8
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.306.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.308.dist-info}/WHEEL +1 -1
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.306.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.308.dist-info}/top_level.txt +0 -0
@@ -137,6 +137,73 @@ def mail_channel_unset_wrong_group_public_id(env):
|
|
137
137
|
)
|
138
138
|
|
139
139
|
|
140
|
+
def mail_channel_private_compatibility(env):
|
141
|
+
"""In v15 you could set a private group that only members could access, now in v16
|
142
|
+
this is not possible.
|
143
|
+
Defining the group_public_id empty will make everyone can access, and leaving the
|
144
|
+
value that has group_public_id with 'base.group_user' by default is totally wrong.
|
145
|
+
In order to maintain the compatibility of the existing channels, two transformations
|
146
|
+
are necessary:
|
147
|
+
- If a channel is private, but had only one auto-subscription group (group_ids), those
|
148
|
+
group become the authorized one (group_public_id) of the channel, and it remains as such
|
149
|
+
as a channel, since at the end, the auto-subscription groups adds as members all the
|
150
|
+
users of those groups, acting in the same way.
|
151
|
+
- If the list of members was manual, then the channel becomes a 'Direct Messages'
|
152
|
+
(channel_type='group'), keeping the channel name and authorized members.
|
153
|
+
"""
|
154
|
+
env.cr.execute(
|
155
|
+
"""
|
156
|
+
SELECT
|
157
|
+
c.id,
|
158
|
+
c.name,
|
159
|
+
(
|
160
|
+
SELECT COUNT(res_groups_id)
|
161
|
+
FROM mail_channel_res_groups_rel
|
162
|
+
WHERE mail_channel_id = c.id
|
163
|
+
) AS total_groups,
|
164
|
+
(
|
165
|
+
SELECT res_groups_id
|
166
|
+
FROM mail_channel_res_groups_rel
|
167
|
+
WHERE mail_channel_id = c.id
|
168
|
+
LIMIT 1
|
169
|
+
) AS auto_subscribe_group_0
|
170
|
+
FROM mail_channel AS c
|
171
|
+
WHERE c.channel_type = 'channel' AND c.public = 'private'
|
172
|
+
"""
|
173
|
+
)
|
174
|
+
for channel_id, _name, total_groups, auto_subscribe_group_0 in env.cr.fetchall():
|
175
|
+
if total_groups == 1:
|
176
|
+
openupgrade.logged_query(
|
177
|
+
env.cr,
|
178
|
+
"""
|
179
|
+
UPDATE mail_channel
|
180
|
+
SET group_public_id = %s
|
181
|
+
WHERE id = %s
|
182
|
+
""",
|
183
|
+
(auto_subscribe_group_0, channel_id),
|
184
|
+
)
|
185
|
+
else:
|
186
|
+
# Remove the auto-subscription groups linked also to avoid
|
187
|
+
# _constraint_group_id_channel()
|
188
|
+
openupgrade.logged_query(
|
189
|
+
env.cr,
|
190
|
+
"""
|
191
|
+
DELETE FROM mail_channel_res_groups_rel
|
192
|
+
WHERE mail_channel_id= %s
|
193
|
+
""",
|
194
|
+
(channel_id,),
|
195
|
+
)
|
196
|
+
openupgrade.logged_query(
|
197
|
+
env.cr,
|
198
|
+
"""
|
199
|
+
UPDATE mail_channel
|
200
|
+
SET channel_type = 'group', group_public_id = NULL
|
201
|
+
WHERE id = %s
|
202
|
+
""",
|
203
|
+
(channel_id,),
|
204
|
+
)
|
205
|
+
|
206
|
+
|
140
207
|
def scheduled_date_set_empty_strings_to_null(env):
|
141
208
|
openupgrade.logged_query(
|
142
209
|
env.cr,
|
@@ -161,3 +228,4 @@ def migrate(env, version):
|
|
161
228
|
ir_act_server_rename_state_email(env)
|
162
229
|
mail_channel_channel_type_required(env)
|
163
230
|
scheduled_date_set_empty_strings_to_null(env)
|
231
|
+
mail_channel_private_compatibility(env)
|
@@ -22,7 +22,28 @@ def _handle_multi_location_visibility(env):
|
|
22
22
|
view.active = False
|
23
23
|
|
24
24
|
|
25
|
+
def _handle_stock_picking_backorder_strategy(env):
|
26
|
+
# Handle the merge of OCA/stock-logistics-workflow/stock_picking_backorder_strategy
|
27
|
+
# feature in odoo/stock V16 module.
|
28
|
+
if openupgrade.column_exists(
|
29
|
+
env.cr, "stock_picking_type", openupgrade.get_legacy_name("backorder_strategy")
|
30
|
+
):
|
31
|
+
openupgrade.map_values(
|
32
|
+
env.cr,
|
33
|
+
openupgrade.get_legacy_name("backorder_strategy"),
|
34
|
+
"create_backorder",
|
35
|
+
[
|
36
|
+
("manual", "ask"),
|
37
|
+
("create", "always"),
|
38
|
+
("no_create", "never"),
|
39
|
+
("cancel", "never"),
|
40
|
+
],
|
41
|
+
table="stock_picking_type",
|
42
|
+
)
|
43
|
+
|
44
|
+
|
25
45
|
@openupgrade.migrate()
|
26
46
|
def migrate(env, version):
|
27
47
|
_handle_multi_location_visibility(env)
|
48
|
+
_handle_stock_picking_backorder_strategy(env)
|
28
49
|
openupgrade.load_data(env.cr, "stock", "16.0.1.1/noupdate_changes.xml")
|
@@ -112,6 +112,21 @@ def _update_stock_quant_package_pack_date(env):
|
|
112
112
|
)
|
113
113
|
|
114
114
|
|
115
|
+
def _handle_stock_picking_backorder_strategy(env):
|
116
|
+
# Handle the merge of OCA/stock-logistics-workflow/stock_picking_backorder_strategy
|
117
|
+
# feature in odoo/stock V16 module.
|
118
|
+
if openupgrade.column_exists(env.cr, "stock_picking_type", "backorder_strategy"):
|
119
|
+
# Rename column
|
120
|
+
openupgrade.rename_columns(
|
121
|
+
env.cr,
|
122
|
+
{
|
123
|
+
"stock_picking_type": [
|
124
|
+
("backorder_strategy", None),
|
125
|
+
],
|
126
|
+
},
|
127
|
+
)
|
128
|
+
|
129
|
+
|
115
130
|
@openupgrade.migrate()
|
116
131
|
def migrate(env, version):
|
117
132
|
openupgrade.rename_tables(env.cr, _tables_renames)
|
@@ -122,3 +137,4 @@ def migrate(env, version):
|
|
122
137
|
_update_stock_quant_package_pack_date(env)
|
123
138
|
_update_sol_product_category_name(env)
|
124
139
|
_compute_stock_location_replenish_location(env)
|
140
|
+
_handle_stock_picking_backorder_strategy(env)
|
@@ -119,7 +119,8 @@ stock / stock.picking / move_lines (one2many) : DEL re
|
|
119
119
|
|
120
120
|
stock / stock.picking.type / auto_show_reception_report (boolean): NEW
|
121
121
|
stock / stock.picking.type / create_backorder (selection) : NEW required, selection_keys: ['always', 'ask', 'never'], hasdefault: default
|
122
|
-
#
|
122
|
+
# - If stock_picking_backorder_strategy was installed, data are populated with the field backorder_strategy
|
123
|
+
# - Otherwise, NOTHING TO DO
|
123
124
|
|
124
125
|
stock / stock.production.lot / activity_ids (one2many) : DEL relation: mail.activity
|
125
126
|
stock / stock.production.lot / company_id (many2one) : DEL relation: res.company, required
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: odoo-addon-openupgrade_scripts
|
3
|
-
Version: 16.0.1.0.3.
|
3
|
+
Version: 16.0.1.0.3.308
|
4
4
|
Summary: Module that contains all the migrations analysis and scripts for migrate Odoo SA modules.
|
5
5
|
Home-page: https://github.com/OCA/OpenUpgrade
|
6
6
|
Author: Odoo Community Association (OCA)
|
@@ -11,7 +11,7 @@ Classifier: Framework :: Odoo
|
|
11
11
|
Classifier: Framework :: Odoo :: 16.0
|
12
12
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
13
13
|
Requires-Python: >=3.10
|
14
|
-
Requires-Dist: odoo
|
14
|
+
Requires-Dist: odoo<16.1dev,>=16.0a
|
15
15
|
Requires-Dist: openupgradelib
|
16
16
|
|
17
17
|
===================
|
@@ -361,7 +361,7 @@ odoo/addons/openupgrade_scripts/scripts/lunch/16.0.1.0/upgrade_analysis_work.txt
|
|
361
361
|
odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/end-migration.py,sha256=aX9Xy1GJatSTyUgalaUkJ8OjZILAqJ2SI6KPXJAXXvg,2223
|
362
362
|
odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/noupdate_changes.xml,sha256=8b74tz5LRJrf76AuyOTRIl4w3NvwHe9YivwafOnoBdU,1439
|
363
363
|
odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/post-migration.py,sha256=npwS2ylEgDiqM-CY-XzYe1o2tkXCCo3lR_qNhQPCzKM,262
|
364
|
-
odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/pre-migration.py,sha256=
|
364
|
+
odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/pre-migration.py,sha256=7xPNXcG-JIjOSMGLx-OZ0HIlr7raBM2niPZx6RCQf6I,7322
|
365
365
|
odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/upgrade_analysis.txt,sha256=ev0yHLx23bmYinSh58rE9PJeF6PTwQHIThk9So-4uag,9744
|
366
366
|
odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/upgrade_analysis_work.txt,sha256=igoXVrhgdF0vOlWxPgZeI91uFhJsH5OvUxHHl6hMA7E,11295
|
367
367
|
odoo/addons/openupgrade_scripts/scripts/mail/16.0.1.10/tests/data.py,sha256=GU_Vcq1F4DWujCx3joNM4MvKAHSFt2b3vhwpbN7oYGo,332
|
@@ -596,10 +596,10 @@ odoo/addons/openupgrade_scripts/scripts/spreadsheet_dashboard_sale_timesheet/16.
|
|
596
596
|
odoo/addons/openupgrade_scripts/scripts/spreadsheet_dashboard_stock_account/16.0.1.0/upgrade_analysis.txt,sha256=Vp-WUODorZEcKxq6rrNuRluCu9NbzZfNXIcNEM03Vdo,291
|
597
597
|
odoo/addons/openupgrade_scripts/scripts/spreadsheet_dashboard_website_sale_slides/16.0.1.0/upgrade_analysis.txt,sha256=ia8_6HEpeaY5bOmyhrMq92t8PKztRaCPP_w7w4AqZW0,307
|
598
598
|
odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/noupdate_changes.xml,sha256=duUlxKkToVmaan9wD3Kl8phi_TT3V4CJ3mNAADH69NE,805
|
599
|
-
odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/post-migration.py,sha256=
|
600
|
-
odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/pre-migration.py,sha256=
|
599
|
+
odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/post-migration.py,sha256=Jr9z-ZZeX4Pgz-cYYAzMVNnka1J4kZpqGlvjIJ4uRIU,1804
|
600
|
+
odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/pre-migration.py,sha256=rrH-Z2SIjEa-jiChSexE1jwkXfCTmRQwG1hI7qjq4yc,4207
|
601
601
|
odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/upgrade_analysis.txt,sha256=hI1BB9O45hRFUGUM8_uws2yoblPYMy26X3bZt1II7_U,8133
|
602
|
-
odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/upgrade_analysis_work.txt,sha256=
|
602
|
+
odoo/addons/openupgrade_scripts/scripts/stock/16.0.1.1/upgrade_analysis_work.txt,sha256=dXR_YCBpT5ir8Rqnov_qa7amOdk5BawVZOhpEDcEwgs,14431
|
603
603
|
odoo/addons/openupgrade_scripts/scripts/stock_account/16.0.1.1/pre-migration.py,sha256=xVzqocfCFvbB5AGOrPUVyhCVdn8KEkyssMBvpsUcth8,948
|
604
604
|
odoo/addons/openupgrade_scripts/scripts/stock_account/16.0.1.1/upgrade_analysis.txt,sha256=--ShQGHEIfJ3hxITbLby_mqEszI05hutMWsZekrqnd8,805
|
605
605
|
odoo/addons/openupgrade_scripts/scripts/stock_account/16.0.1.1/upgrade_analysis_work.txt,sha256=ns6T8z3WXky-hn5FZNFLsxf3Uz7JIORzWT300uY_Aw8,865
|
@@ -723,7 +723,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/16.0.1.0/upgrade_analysi
|
|
723
723
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
724
724
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
725
725
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=IOWtZdzr_jN_Dja8HYIfzIxrO8NE5pFgazKJtPsLKw0,12678
|
726
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
727
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
728
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
729
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
726
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.308.dist-info/METADATA,sha256=4Ysk81BVrQ7y8r1LiSNoD_UNAJ7hf2wktoj4NZuShcM,3789
|
727
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.308.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
728
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.308.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
729
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.308.dist-info/RECORD,,
|