odoo-addon-openupgrade-scripts 16.0.1.0.3.263__py3-none-any.whl → 16.0.1.0.3.264__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/website/16.0.1.0/end-migration.py +21 -8
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.263.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info}/METADATA +1 -1
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.263.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info}/RECORD +5 -5
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.263.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info}/WHEEL +0 -0
- {odoo_addon_openupgrade_scripts-16.0.1.0.3.263.dist-info → odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info}/top_level.txt +0 -0
@@ -33,8 +33,11 @@ def convert_custom_qweb_templates_bootstrap_4to5(env):
|
|
33
33
|
def convert_field_html_string_bootstrap_4to5(env):
|
34
34
|
"""Convert html field which might contain old bootstrap syntax"""
|
35
35
|
# These models won't use bootstrap in their html fields
|
36
|
-
|
36
|
+
model_exclusions = [
|
37
|
+
"mail.activity",
|
37
38
|
"mail.message",
|
39
|
+
"mail.wizard.invite",
|
40
|
+
"web_editor.converter.test",
|
38
41
|
"mail.mail",
|
39
42
|
"mail.template",
|
40
43
|
"res.users",
|
@@ -43,22 +46,32 @@ def convert_field_html_string_bootstrap_4to5(env):
|
|
43
46
|
"account.invoice.send",
|
44
47
|
"mail.alias",
|
45
48
|
]
|
49
|
+
# We could want to refine a certain field logic to discard a good bunch of records
|
50
|
+
field_special_domain = {
|
51
|
+
"account.move": {
|
52
|
+
"narration": [
|
53
|
+
("move_type", "in", ["out_invoice", "out_refund", "out_receipt"])
|
54
|
+
]
|
55
|
+
},
|
56
|
+
}
|
46
57
|
fields = env["ir.model.fields"].search(
|
47
|
-
[
|
58
|
+
[
|
59
|
+
("ttype", "=", "html"),
|
60
|
+
("store", "=", True),
|
61
|
+
("model", "not in", model_exclusions),
|
62
|
+
]
|
48
63
|
)
|
49
64
|
for field in fields:
|
50
65
|
model = field.model_id.model
|
51
|
-
|
52
|
-
|
53
|
-
logger.info(f"Converting from BS4 to BS5 field {field} in model {model}")
|
66
|
+
# The method convert_field_bootstrap_4to5 takes care of empty fields considering
|
67
|
+
domain = field_special_domain.get(model, {}).get(field.name, [])
|
68
|
+
logger.info(f"Converting from BS4 to BS5 field {field.name} in model {model}")
|
54
69
|
if env.get(model, False) is not False and env[model]._auto:
|
55
70
|
if openupgrade.table_exists(env.cr, env[model]._table):
|
56
71
|
if field.name in env[model]._fields and openupgrade.column_exists(
|
57
72
|
env.cr, env[model]._table, field.name
|
58
73
|
):
|
59
|
-
convert_field_bootstrap_4to5(
|
60
|
-
env, model, field.name, domain=[(field.name, "!=", False)]
|
61
|
-
)
|
74
|
+
convert_field_bootstrap_4to5(env, model, field.name, domain=domain)
|
62
75
|
|
63
76
|
|
64
77
|
def rename_t_group_website_restricted_editor(env):
|
@@ -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.264
|
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)
|
@@ -608,7 +608,7 @@ odoo/addons/openupgrade_scripts/scripts/web_editor/16.0.1.0/upgrade_analysis.txt
|
|
608
608
|
odoo/addons/openupgrade_scripts/scripts/web_editor/16.0.1.0/upgrade_analysis_work.txt,sha256=0aFLxiZZm2pddnvepo7jSIJ3Iek3mnH4oLV7rnG0jRE,213
|
609
609
|
odoo/addons/openupgrade_scripts/scripts/web_tour/16.0.0.1/upgrade_analysis.txt,sha256=_dVyBxQ-ck0iyHgRd6mifxeSsMCRxdpCQcCDVn-lvMk,147
|
610
610
|
odoo/addons/openupgrade_scripts/scripts/web_tour/16.0.0.1/upgrade_analysis_work.txt,sha256=OFVVLWaIounkcVq_mmX4DP7on6of6oG3NFVgMQ2KEZc,163
|
611
|
-
odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/end-migration.py,sha256=
|
611
|
+
odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/end-migration.py,sha256=ZpSGVwmWzUfoTsagrZuRyPHL5HAdRcxVYkvu_TMTgxE,3518
|
612
612
|
odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/noupdate_changes.xml,sha256=L-3aiHxRTaP4bwEAnpCcb5PmP1DF4HXNTGb70cgsnb0,218
|
613
613
|
odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/post-migration.py,sha256=o6fuzgKXOoamlXNMm9UYMGrWJ7xEnvyNzRNiK-h-ZWA,169
|
614
614
|
odoo/addons/openupgrade_scripts/scripts/website/16.0.1.0/pre-migration.py,sha256=Invtw62qgK3tIwp8vcjNueh9b5pnztTXfmuMsWiyoBU,4709
|
@@ -701,7 +701,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/16.0.1.0/upgrade_analysi
|
|
701
701
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
702
702
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
703
703
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=IOWtZdzr_jN_Dja8HYIfzIxrO8NE5pFgazKJtPsLKw0,12678
|
704
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
705
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
706
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
707
|
-
odoo_addon_openupgrade_scripts-16.0.1.0.3.
|
704
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info/METADATA,sha256=rZ-yXabXSPW95VqL_5xwrzWPjuPpuVsf3eVp6KGD2LA,3810
|
705
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
706
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
707
|
+
odoo_addon_openupgrade_scripts-16.0.1.0.3.264.dist-info/RECORD,,
|
File without changes
|