odoo-addon-openupgrade-scripts 17.0.1.0.1.33__py3-none-any.whl → 17.0.1.0.1.47__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/analytic/17.0.1.1/post-migration.py +92 -0
- odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.1/pre-migration.py +38 -0
- odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.1/upgrade_analysis_work.txt +30 -0
- odoo/addons/openupgrade_scripts/scripts/calendar/17.0.1.1/post-migration.py +9 -0
- odoo/addons/openupgrade_scripts/scripts/digest/17.0.1.1/post-migration.py +9 -0
- odoo/addons/openupgrade_scripts/scripts/digest/17.0.1.1/pre-migration.py +19 -0
- odoo/addons/openupgrade_scripts/scripts/digest/17.0.1.1/upgrade_analysis_work.txt +9 -0
- odoo/addons/openupgrade_scripts/scripts/product/17.0.1.2/post-migration.py +68 -0
- odoo/addons/openupgrade_scripts/scripts/product/17.0.1.2/pre-migration.py +45 -0
- odoo/addons/openupgrade_scripts/scripts/product/17.0.1.2/upgrade_analysis_work.txt +97 -0
- odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/post-migration.py +17 -0
- odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/pre-migration.py +31 -0
- odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/upgrade_analysis_work.txt +21 -0
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.33.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.47.dist-info}/METADATA +1 -1
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.33.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.47.dist-info}/RECORD +17 -5
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.33.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.47.dist-info}/WHEEL +0 -0
- {odoo_addon_openupgrade_scripts-17.0.1.0.1.33.dist-info → odoo_addon_openupgrade_scripts-17.0.1.0.1.47.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
|
2
|
+
# Copyright 2024 Hunki enterprises - Holger Brunn
|
3
|
+
# Copyright 2024 Tecnativa - Pedro M. Baeza
|
4
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
5
|
+
from openupgradelib import openupgrade
|
6
|
+
|
7
|
+
_deleted_xml_records = ["analytic.analytic_plan_comp_rule"]
|
8
|
+
|
9
|
+
|
10
|
+
def _adjust_analytic_plan_sequence(env):
|
11
|
+
"""As now the order is by sequence, and on v16 it was the id, we have to assign the
|
12
|
+
sequence numbers to preserve the previous order by default, for not having any
|
13
|
+
undesired modification. Once in v17, you can redefine the order to your
|
14
|
+
choice if desired.
|
15
|
+
"""
|
16
|
+
openupgrade.logged_query(
|
17
|
+
env.cr,
|
18
|
+
"""
|
19
|
+
UPDATE account_analytic_plan aap
|
20
|
+
SET sequence = sub.row_number
|
21
|
+
FROM (
|
22
|
+
SELECT id, row_number()
|
23
|
+
OVER (PARTITION BY True order by id)
|
24
|
+
FROM account_analytic_plan
|
25
|
+
) as sub
|
26
|
+
WHERE sub.id = aap.id
|
27
|
+
""",
|
28
|
+
)
|
29
|
+
|
30
|
+
|
31
|
+
def _analytic_line_create_x_plan_column(env):
|
32
|
+
"""
|
33
|
+
This method set system parameter for project analytic plan
|
34
|
+
and create dynamic field on analytic items using
|
35
|
+
'_sync_plan_column' method
|
36
|
+
"""
|
37
|
+
project_plan = (
|
38
|
+
env.ref("analytic.analytic_plan_projects", raise_if_not_found=False)
|
39
|
+
or env["account.analytic.plan"]
|
40
|
+
)
|
41
|
+
if project_plan:
|
42
|
+
env["ir.config_parameter"].set_param(
|
43
|
+
"analytic.project_plan", str(project_plan.id)
|
44
|
+
)
|
45
|
+
plans_to_create_fields = env["account.analytic.plan"].search([])
|
46
|
+
(plans_to_create_fields - project_plan)._sync_plan_column()
|
47
|
+
for plan in plans_to_create_fields - project_plan:
|
48
|
+
if plan.parent_id:
|
49
|
+
continue
|
50
|
+
column = plan._strict_column_name()
|
51
|
+
openupgrade.logged_query(
|
52
|
+
env.cr,
|
53
|
+
f"""
|
54
|
+
UPDATE account_analytic_line
|
55
|
+
SET {column} = account_id,
|
56
|
+
account_id = NULL
|
57
|
+
WHERE plan_id = {plan.id};
|
58
|
+
""",
|
59
|
+
)
|
60
|
+
|
61
|
+
|
62
|
+
def _analytic_plan_update_applicability_into_property(env):
|
63
|
+
"""
|
64
|
+
Create ir.property for default_applicability of account.analytic.plan
|
65
|
+
in all companies as the company_id field was shifted from account.analytic.plan
|
66
|
+
to account.analytic.applicability
|
67
|
+
"""
|
68
|
+
env.cr.execute(
|
69
|
+
"""
|
70
|
+
SELECT id, default_applicability FROM account_analytic_plan
|
71
|
+
WHERE default_applicability != 'optional'
|
72
|
+
"""
|
73
|
+
)
|
74
|
+
values = dict(env.cr.fetchall())
|
75
|
+
for company in env["res.company"].search([]):
|
76
|
+
env["ir.property"].with_company(company)._set_multi(
|
77
|
+
"default_applicability",
|
78
|
+
"account.analytic.plan",
|
79
|
+
values,
|
80
|
+
)
|
81
|
+
|
82
|
+
|
83
|
+
@openupgrade.migrate()
|
84
|
+
def migrate(env, version):
|
85
|
+
_adjust_analytic_plan_sequence(env)
|
86
|
+
openupgrade.load_data(env, "analytic", "17.0.1.1/noupdate_changes.xml")
|
87
|
+
openupgrade.delete_records_safely_by_xml_id(
|
88
|
+
env,
|
89
|
+
_deleted_xml_records,
|
90
|
+
)
|
91
|
+
_analytic_line_create_x_plan_column(env)
|
92
|
+
_analytic_plan_update_applicability_into_property(env)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
|
2
|
+
# Copyright 2024 Hunki enterprises - Holger Brunn
|
3
|
+
# Copyright 2024 Tecnativa - Pedro M. Baeza
|
4
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
5
|
+
from openupgradelib import openupgrade
|
6
|
+
|
7
|
+
|
8
|
+
def _fill_config_parameter_analytic_project_plan(env):
|
9
|
+
env["ir.config_parameter"].set_param("analytic.project_plan", "1")
|
10
|
+
|
11
|
+
|
12
|
+
def _analytic_applicability_fill_company_id(env):
|
13
|
+
openupgrade.logged_query(
|
14
|
+
env.cr,
|
15
|
+
"""
|
16
|
+
ALTER TABLE account_analytic_applicability
|
17
|
+
ADD COLUMN IF NOT EXISTS company_id INTEGER;
|
18
|
+
""",
|
19
|
+
)
|
20
|
+
|
21
|
+
|
22
|
+
@openupgrade.migrate()
|
23
|
+
def migrate(env, version):
|
24
|
+
_fill_config_parameter_analytic_project_plan(env)
|
25
|
+
_analytic_applicability_fill_company_id(env)
|
26
|
+
# Drop triagram index on name column of account.analytic.account
|
27
|
+
# to avoid error when loading registry, it will be recreated
|
28
|
+
openupgrade.logged_query(
|
29
|
+
env.cr,
|
30
|
+
"""
|
31
|
+
DROP INDEX IF EXISTS account_analytic_account_name_index;
|
32
|
+
""",
|
33
|
+
)
|
34
|
+
# Save company_id field of analytic plans for modules reinstating this
|
35
|
+
# to pick up
|
36
|
+
openupgrade.copy_columns(
|
37
|
+
env.cr, {"account_analytic_plan": [("company_id", None, None)]}
|
38
|
+
)
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---Models in module 'analytic'---
|
2
|
+
---Fields in module 'analytic'---
|
3
|
+
analytic / account.analytic.account / message_main_attachment_id (many2one): DEL relation: ir.attachment
|
4
|
+
# NOTHING TO DO: Feature mainly not used
|
5
|
+
|
6
|
+
analytic / account.analytic.account / root_plan_id (many2one) : not a function anymore
|
7
|
+
analytic / account.analytic.account / root_plan_id (many2one) : now related
|
8
|
+
# NOTHING TO DO: The related is equivalent to the previous compute
|
9
|
+
|
10
|
+
analytic / account.analytic.plan / _order : _order is now 'sequence asc, id' ('complete_name asc')
|
11
|
+
analytic / account.analytic.plan / sequence (integer) : NEW hasdefault: default
|
12
|
+
# DONE: post-migration: Set sequence for following the same order than in previous version
|
13
|
+
|
14
|
+
analytic / account.analytic.applicability / company_id (many2one) : NEW relation: res.company, hasdefault: default
|
15
|
+
analytic / account.analytic.plan / company_id (many2one) : DEL relation: res.company
|
16
|
+
# DONE: pre-migration: create column and let empty value, as it's what preserves the previous behavior
|
17
|
+
|
18
|
+
analytic / account.analytic.line / plan_id (many2one) : DEL relation: account.analytic.plan
|
19
|
+
# DONE: post-migration: create dynamic x_plan_id column using '_sync_plan_column' method in analytic.plan, pr: https://github.com/odoo/odoo/pull/139225
|
20
|
+
|
21
|
+
analytic / account.analytic.plan / default_applicability (selection): not stored anymore
|
22
|
+
# DONE: post-migration: create ir.property if default_applicability != 'optional'
|
23
|
+
|
24
|
+
---XML records in module 'analytic'---
|
25
|
+
NEW account.analytic.plan: analytic.analytic_plan_projects (noupdate)
|
26
|
+
NEW ir.rule: analytic.analytic_applicability_comp_rule (noupdate)
|
27
|
+
# NOTHING TO DO
|
28
|
+
|
29
|
+
DEL ir.rule: analytic.analytic_plan_comp_rule (noupdate)
|
30
|
+
# DONE: post-migration: try to delete safely the record
|
@@ -7,3 +7,12 @@ from openupgradelib import openupgrade
|
|
7
7
|
@openupgrade.migrate()
|
8
8
|
def migrate(env, version):
|
9
9
|
openupgrade.load_data(env, "calendar", "17.0.1.1/noupdate_changes.xml")
|
10
|
+
openupgrade.delete_record_translations(
|
11
|
+
env.cr,
|
12
|
+
"calendar",
|
13
|
+
[
|
14
|
+
"calendar_template_meeting_invitation",
|
15
|
+
"calendar_template_meeting_reminder",
|
16
|
+
"calendar_template_meeting_update",
|
17
|
+
],
|
18
|
+
)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# Copyright 2024 Tecnativa - Pedro M. Baeza
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
from openupgradelib import openupgrade
|
4
|
+
|
5
|
+
|
6
|
+
@openupgrade.migrate()
|
7
|
+
def migrate(env, version):
|
8
|
+
openupgrade.load_data(env, "digest", "17.0.1.1/noupdate_changes.xml")
|
9
|
+
openupgrade.delete_record_translations(env.cr, "digest", ["digest_mail_layout"])
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
|
2
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
3
|
+
from openupgradelib import openupgrade
|
4
|
+
|
5
|
+
|
6
|
+
@openupgrade.migrate()
|
7
|
+
def migrate(env, version):
|
8
|
+
openupgrade.set_xml_ids_noupdate_value(
|
9
|
+
env,
|
10
|
+
"digest",
|
11
|
+
[
|
12
|
+
"digest_tip_digest_0",
|
13
|
+
"digest_tip_digest_1",
|
14
|
+
"digest_tip_digest_2",
|
15
|
+
"digest_tip_digest_3",
|
16
|
+
"digest_tip_digest_4",
|
17
|
+
],
|
18
|
+
False,
|
19
|
+
)
|
@@ -0,0 +1,9 @@
|
|
1
|
+
---Models in module 'digest'---
|
2
|
+
---Fields in module 'digest'---
|
3
|
+
---XML records in module 'digest'---
|
4
|
+
digest.tip: digest.digest_tip_digest_0 (noupdate switched)
|
5
|
+
digest.tip: digest.digest_tip_digest_1 (noupdate switched)
|
6
|
+
digest.tip: digest.digest_tip_digest_2 (noupdate switched)
|
7
|
+
digest.tip: digest.digest_tip_digest_3 (noupdate switched)
|
8
|
+
digest.tip: digest.digest_tip_digest_4 (noupdate switched)
|
9
|
+
# DONE: switched noupdate in pre-migration
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
|
2
|
+
# Copyright 2024 Hunki enterprises - Holger Brunn
|
3
|
+
# Copyright 2024 Tecnativa - Pedro M. Baeza
|
4
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
5
|
+
|
6
|
+
from openupgradelib import openupgrade
|
7
|
+
|
8
|
+
|
9
|
+
def _preserve_pricelist_order(env):
|
10
|
+
"""As the order determines which priority to apply the pricelists, we should assure
|
11
|
+
that with the new order criteria, everything remains the same, so let's rewrite the
|
12
|
+
sequence for not depending on the id.
|
13
|
+
"""
|
14
|
+
openupgrade.logged_query(
|
15
|
+
env.cr,
|
16
|
+
"""
|
17
|
+
UPDATE product_pricelist pp
|
18
|
+
SET sequence = sub.row_number
|
19
|
+
FROM (
|
20
|
+
SELECT id, row_number()
|
21
|
+
OVER (PARTITION BY True order by sequence, id desc)
|
22
|
+
FROM product_pricelist
|
23
|
+
) as sub
|
24
|
+
WHERE sub.id = pp.id
|
25
|
+
""",
|
26
|
+
)
|
27
|
+
|
28
|
+
|
29
|
+
def _remove_if_applicable_base_pricelist(env):
|
30
|
+
"""As this pricelist may be used by users for adding extra rules, we can't just
|
31
|
+
remove it. Let's check the content, and if the pricelist hasn't been touched, then
|
32
|
+
try to remove it. If any modification, we just remove the XML-ID.
|
33
|
+
"""
|
34
|
+
pricelist = env.ref("product.list0", False)
|
35
|
+
if not pricelist:
|
36
|
+
return
|
37
|
+
if len(pricelist.item_ids) == 1:
|
38
|
+
item = pricelist.item_ids
|
39
|
+
if (
|
40
|
+
item.compute_price == "formula"
|
41
|
+
and item.base == "list_price"
|
42
|
+
and item.applied_on == "3_global"
|
43
|
+
and item.price_discount == 0
|
44
|
+
and item.price_surcharge == 0
|
45
|
+
):
|
46
|
+
openupgrade.delete_records_safely_by_xml_id(env, ["product.list0"])
|
47
|
+
return
|
48
|
+
openupgrade.logged_query(
|
49
|
+
env.cr, "DELETE FROM ir_model_date WHERE module = 'product' AND name='list0'"
|
50
|
+
)
|
51
|
+
|
52
|
+
|
53
|
+
@openupgrade.migrate()
|
54
|
+
def migrate(env, version):
|
55
|
+
_preserve_pricelist_order(env)
|
56
|
+
openupgrade.load_data(env, "product", "17.0.1.2/noupdate_changes.xml")
|
57
|
+
openupgrade.logged_query(
|
58
|
+
env.cr,
|
59
|
+
"""
|
60
|
+
INSERT INTO product_document (
|
61
|
+
ir_attachment_id, active, create_uid, write_uid, create_date, write_date
|
62
|
+
)
|
63
|
+
SELECT id, True, create_uid, write_uid, create_date, write_date
|
64
|
+
FROM ir_attachment
|
65
|
+
WHERE res_model IN ('product.product', 'product.template')
|
66
|
+
AND res_field IS NULL
|
67
|
+
""",
|
68
|
+
)
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
|
2
|
+
# Copyright 2024 Hunki enterprises - Holger Brunn
|
3
|
+
# Copyright 2024 Tecnativa - Pedro M. Baeza
|
4
|
+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
5
|
+
|
6
|
+
from openupgradelib import openupgrade
|
7
|
+
|
8
|
+
|
9
|
+
def _clean_incorrect_packaging_records(env):
|
10
|
+
"""If there's any record of this kind, it's invalid and maybe a leftover of a
|
11
|
+
non-cascade removal operation. Let's clean the table. There's a chance that this
|
12
|
+
package was used elsewhere, so this will crash, but in that case, it seems legit to
|
13
|
+
do it, for checking what's going on.
|
14
|
+
"""
|
15
|
+
openupgrade.logged_query(
|
16
|
+
env.cr, "DELETE FROM product_packaging WHERE product_id IS NULL"
|
17
|
+
)
|
18
|
+
|
19
|
+
|
20
|
+
@openupgrade.migrate()
|
21
|
+
def migrate(env, version):
|
22
|
+
_clean_incorrect_packaging_records(env)
|
23
|
+
openupgrade.logged_query(
|
24
|
+
env.cr,
|
25
|
+
"""
|
26
|
+
ALTER TABLE product_tag
|
27
|
+
ALTER COLUMN color TYPE VARCHAR USING color::VARCHAR;
|
28
|
+
|
29
|
+
UPDATE product_tag
|
30
|
+
SET color = CASE
|
31
|
+
WHEN color = '1' THEN '#F06050'
|
32
|
+
WHEN color = '2' THEN '#F4A460'
|
33
|
+
WHEN color = '3' THEN '#F7CD1F'
|
34
|
+
WHEN color = '4' THEN '#6CC1ED'
|
35
|
+
WHEN color = '5' THEN '#814968'
|
36
|
+
WHEN color = '6' THEN '#EB7E7F'
|
37
|
+
WHEN color = '7' THEN '#2C8397'
|
38
|
+
WHEN color = '8' THEN '#475577'
|
39
|
+
WHEN color = '9' THEN '#D6145F'
|
40
|
+
WHEN color = '10' THEN '#30C381'
|
41
|
+
WHEN color = '11' THEN '#9365B8'
|
42
|
+
ELSE '#3C3C3C'
|
43
|
+
END;
|
44
|
+
""",
|
45
|
+
)
|
@@ -0,0 +1,97 @@
|
|
1
|
+
---Models in module 'product'---
|
2
|
+
obsolete model report.product.report_producttemplatelabel [abstract]
|
3
|
+
new model product.catalog.mixin [abstract]
|
4
|
+
new model product.document
|
5
|
+
new model report.product.report_producttemplatelabel2x7 [abstract]
|
6
|
+
new model report.product.report_producttemplatelabel4x12 [abstract]
|
7
|
+
new model report.product.report_producttemplatelabel4x12noprice [abstract]
|
8
|
+
new model report.product.report_producttemplatelabel4x7 [abstract]
|
9
|
+
# NOTHING TO DO
|
10
|
+
|
11
|
+
---Fields in module 'product'---
|
12
|
+
product / product.attribute / display_type (selection) : selection_keys is now '['color', 'multi', 'pills', 'radio', 'select']' ('['color', 'pills', 'radio', 'select']')
|
13
|
+
# NOTHING TO DO: add new selection: multi
|
14
|
+
|
15
|
+
product / product.attribute.value / default_extra_price (float) : NEW
|
16
|
+
# NOTHING TO DO: new feature for filling with this value the product variant attribute values created from this
|
17
|
+
|
18
|
+
product / product.attribute.value / image (binary) : NEW attachment: True
|
19
|
+
# NOTHING TO DO: new feature for having an image linked to this value
|
20
|
+
|
21
|
+
product / product.category / product_properties_definition (properties_definition): NEW
|
22
|
+
product / product.template / product_properties (properties): NEW hasdefault: compute
|
23
|
+
# NOTHING TO DO: new feature for having properties on products
|
24
|
+
|
25
|
+
product / product.document / _inherits : NEW _inherits: {'ir.attachment': 'ir_attachment_id'}
|
26
|
+
product / product.document / active (boolean) : NEW hasdefault: default
|
27
|
+
product / product.document / ir_attachment_id (many2one) : NEW relation: ir.attachment, required
|
28
|
+
product / product.product / product_document_ids (one2many): NEW relation: product.document
|
29
|
+
product / product.template / product_document_ids (one2many): NEW relation: product.document
|
30
|
+
# DONE: post-migration: populated with attachments on product.template and product.product
|
31
|
+
|
32
|
+
product / product.packaging / product_id (many2one) : now required
|
33
|
+
# DONE: pre-migration: delete records with no product_id, as they are not valid
|
34
|
+
|
35
|
+
product / product.pricelist / _order : _order is now 'sequence asc, id asc' ('sequence asc, id desc')
|
36
|
+
# DONE: post-migration: Write sequence for making sure the old pricelist order is preserved
|
37
|
+
|
38
|
+
product / product.pricelist / activity_ids (one2many) : NEW relation: mail.activity
|
39
|
+
product / product.pricelist / message_follower_ids (one2many): NEW relation: mail.followers
|
40
|
+
product / product.pricelist / message_ids (one2many) : NEW relation: mail.message
|
41
|
+
# NOTHING TO DO: Chatter + activity new feature
|
42
|
+
|
43
|
+
product / product.pricelist.item / active (boolean) : DEL
|
44
|
+
# NOTHING TO DO: It was a related stored of the pricelist active, so not adding value
|
45
|
+
|
46
|
+
product / product.product / activity_user_id (many2one) : not related anymore
|
47
|
+
product / product.product / activity_user_id (many2one) : now a function
|
48
|
+
product / product.product / message_main_attachment_id (many2one): DEL relation: ir.attachment
|
49
|
+
# NOTHING TO DO
|
50
|
+
|
51
|
+
product / product.supplierinfo / discount (float) : NEW
|
52
|
+
# NOTHING TO DO
|
53
|
+
|
54
|
+
product / product.tag / color (integer) : type is now 'char' ('integer')
|
55
|
+
# DONE: pre-migration: converted to the corresponding hexadecimal values
|
56
|
+
|
57
|
+
product / product.template / activity_user_id (many2one) : not related anymore
|
58
|
+
product / product.template / activity_user_id (many2one) : now a function
|
59
|
+
product / product.template / message_main_attachment_id (many2one): DEL relation: ir.attachment
|
60
|
+
# NOTHING TO DO
|
61
|
+
|
62
|
+
product / product.template.attribute.line / _order : _order is now 'sequence, attribute_id, id' ('attribute_id, id')
|
63
|
+
product / product.template.attribute.line / sequence (integer) : NEW hasdefault: default
|
64
|
+
# NOTHING TO DO: new feature
|
65
|
+
|
66
|
+
---XML records in module 'product'---
|
67
|
+
NEW ir.actions.report: product.report_product_template_label_2x7
|
68
|
+
NEW ir.actions.report: product.report_product_template_label_4x12
|
69
|
+
NEW ir.actions.report: product.report_product_template_label_4x12_noprice
|
70
|
+
NEW ir.actions.report: product.report_product_template_label_4x7
|
71
|
+
DEL ir.actions.report: product.report_product_template_label
|
72
|
+
NEW ir.model.access: product.access_product_document_user
|
73
|
+
NEW ir.model.constraint: product.constraint_product_attribute_check_multi_checkbox_no_variant
|
74
|
+
# NOTHING TO DO
|
75
|
+
|
76
|
+
NEW ir.rule: product.product_document_comp_rule (noupdate)
|
77
|
+
NEW ir.ui.view: product.product_attribute_value_list
|
78
|
+
NEW ir.ui.view: product.product_document_form
|
79
|
+
NEW ir.ui.view: product.product_document_kanban
|
80
|
+
NEW ir.ui.view: product.product_document_list
|
81
|
+
NEW ir.ui.view: product.product_document_search
|
82
|
+
NEW ir.ui.view: product.product_product_view_tree_tag
|
83
|
+
NEW ir.ui.view: product.product_template_view_tree_tag
|
84
|
+
NEW ir.ui.view: product.product_view_kanban_catalog
|
85
|
+
NEW ir.ui.view: product.product_view_search_catalog
|
86
|
+
NEW ir.ui.view: product.report_producttemplatelabel2x7
|
87
|
+
NEW ir.ui.view: product.report_producttemplatelabel4x12
|
88
|
+
NEW ir.ui.view: product.report_producttemplatelabel4x12noprice
|
89
|
+
NEW ir.ui.view: product.report_producttemplatelabel4x7
|
90
|
+
NEW ir.ui.view: product.report_simple_label4x12_no_price
|
91
|
+
# NOTHING TO DO
|
92
|
+
|
93
|
+
DEL ir.ui.view: product.report_producttemplatelabel
|
94
|
+
# NOTHING TO DO
|
95
|
+
|
96
|
+
DEL product.pricelist: product.list0 (noupdate)
|
97
|
+
DONE: post-migration: Only remove it if it wasn't not touched and it contains the basic rule. If not, we remove the XML-ID and preserve it
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
|
2
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
3
|
+
|
4
|
+
from openupgradelib import openupgrade
|
5
|
+
|
6
|
+
_deleted_xml_records = [
|
7
|
+
"resource.resource_calendar_std_35h",
|
8
|
+
"resource.resource_calendar_std_38h",
|
9
|
+
]
|
10
|
+
|
11
|
+
|
12
|
+
@openupgrade.migrate()
|
13
|
+
def migrate(env, version):
|
14
|
+
openupgrade.delete_records_safely_by_xml_id(
|
15
|
+
env,
|
16
|
+
_deleted_xml_records,
|
17
|
+
)
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
|
2
|
+
# Copyright 2024 Tecnativa - Pedro M. Baeza
|
3
|
+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
4
|
+
|
5
|
+
from openupgradelib import openupgrade
|
6
|
+
|
7
|
+
|
8
|
+
def _reset_calendar_attendance_sequence(env):
|
9
|
+
"""As the field `sequence` exists previously in 16, and you were able to change it
|
10
|
+
on screen, there's a chance that your DB have some sequence values that alters the
|
11
|
+
previous order when migrating.
|
12
|
+
|
13
|
+
Thus, the safest thing is to reset the sequence value to its default value for
|
14
|
+
preserving always the previous order.
|
15
|
+
"""
|
16
|
+
openupgrade.logged_query(
|
17
|
+
env.cr, "UPDATE resource_calendar_attendance SET sequence = 10"
|
18
|
+
)
|
19
|
+
|
20
|
+
|
21
|
+
@openupgrade.migrate()
|
22
|
+
def migrate(env, version):
|
23
|
+
_reset_calendar_attendance_sequence(env)
|
24
|
+
openupgrade.set_xml_ids_noupdate_value(
|
25
|
+
env,
|
26
|
+
"resource",
|
27
|
+
[
|
28
|
+
"resource_calendar_std",
|
29
|
+
],
|
30
|
+
True,
|
31
|
+
)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---Models in module 'resource'---
|
2
|
+
---Fields in module 'resource'---
|
3
|
+
resource / resource.calendar / hours_per_day (float) : now a function
|
4
|
+
# Nothing To Do, compute non-stored
|
5
|
+
|
6
|
+
resource / resource.calendar.attendance / _order : _order is now 'sequence, week_type, dayofweek, hour_from' ('week_type, dayofweek, hour_from')
|
7
|
+
# DONE: pre-migration: Reset the sequence field to its default value for preserving the order.
|
8
|
+
|
9
|
+
resource / resource.calendar.attendance / day_period (selection) : selection_keys is now '['afternoon', 'lunch', 'morning']' ('['afternoon', 'morning']')
|
10
|
+
# Nothing To Do, new option: lunch
|
11
|
+
|
12
|
+
resource / resource.calendar.attendance / duration_days (float) : NEW hasdefault: compute
|
13
|
+
# Nothing To Do, no need precomputation
|
14
|
+
|
15
|
+
---XML records in module 'resource'---
|
16
|
+
resource.calendar: resource.resource_calendar_std (noupdate) (noupdate switched)
|
17
|
+
# DONE: switched noupdate
|
18
|
+
|
19
|
+
DEL resource.calendar: resource.resource_calendar_std_35h (noupdate)
|
20
|
+
DEL resource.calendar: resource.resource_calendar_std_38h (noupdate)
|
21
|
+
# DONE: safely delete in post-migration
|
@@ -23,7 +23,10 @@ odoo/addons/openupgrade_scripts/scripts/account_qr_code_emv/17.0.1.0/upgrade_ana
|
|
23
23
|
odoo/addons/openupgrade_scripts/scripts/account_tax_python/17.0.1.0/upgrade_analysis.txt,sha256=71VQVnwf1DecQpUjgJWr_6BPWXRJmEjT63S8AtDpHRM,469
|
24
24
|
odoo/addons/openupgrade_scripts/scripts/account_update_tax_tags/17.0.1.0/upgrade_analysis.txt,sha256=JK79MYmDfZhdQU0d4LeMewZo2CpE01ltPRTZdFZHM-k,192
|
25
25
|
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.1/noupdate_changes.xml,sha256=-CxzojBA5uxpeYi2roC1KYP_ROFVQjqDix7GdZAgxY8,421
|
26
|
+
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.1/post-migration.py,sha256=vXrmlemMahBsbFGUOvWl1vAXkQj_Dr2d1UJauneW3xc,3077
|
27
|
+
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.1/pre-migration.py,sha256=98Qy-z4ImZsYCnf5b_3BJQbzyKyfNIiFMf4Tnrtybog,1257
|
26
28
|
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.1/upgrade_analysis.txt,sha256=QvqEqA2DKpDqb3U2ZI27zTnIBBUGG3TZFqE4jSjYGlQ,1252
|
29
|
+
odoo/addons/openupgrade_scripts/scripts/analytic/17.0.1.1/upgrade_analysis_work.txt,sha256=Lnz-_Rry2F973-auNcXzj2QvXdgpCxG3ndUmeOvZaZ4,1867
|
27
30
|
odoo/addons/openupgrade_scripts/scripts/auth_ldap/17.0.1.0/upgrade_analysis.txt,sha256=QB9DfdWzmE0oR4fsd-qPQ9JF5W_uZFNYpvKmNVs_TZw,150
|
28
31
|
odoo/addons/openupgrade_scripts/scripts/auth_oauth/17.0.1.0/upgrade_analysis.txt,sha256=FxJ3tHzlvJtzEN8spiXAXZf7832DrzQ71MkfayvDt_o,153
|
29
32
|
odoo/addons/openupgrade_scripts/scripts/auth_signup/17.0.1.0/noupdate_changes.xml,sha256=V7cwFVd1beUN7HYPkT1KB1HHc7WVwtPe0LWviVylITA,12678
|
@@ -58,7 +61,7 @@ odoo/addons/openupgrade_scripts/scripts/board/17.0.1.0/upgrade_analysis.txt,sha2
|
|
58
61
|
odoo/addons/openupgrade_scripts/scripts/bus/17.0.1.0/upgrade_analysis.txt,sha256=SPdBhavq0qsW3s3Uj-NEYd5ba_DDDwkvoVXy6NBbxfA,132
|
59
62
|
odoo/addons/openupgrade_scripts/scripts/bus/17.0.1.0/upgrade_analysis_work.txt,sha256=2SECsFgKnv-kPuyEXGOLY0blbnQkVazOxdGZxo5bHyg,146
|
60
63
|
odoo/addons/openupgrade_scripts/scripts/calendar/17.0.1.1/noupdate_changes.xml,sha256=QDtRQpvidkYIghSt_LecB0564FYjAiyppsfxElOSxG0,16199
|
61
|
-
odoo/addons/openupgrade_scripts/scripts/calendar/17.0.1.1/post-migration.py,sha256=
|
64
|
+
odoo/addons/openupgrade_scripts/scripts/calendar/17.0.1.1/post-migration.py,sha256=CV6zhfqR12FEirRKdjcvw87Fk-9c4Zo3tRbJYAcurzQ,560
|
62
65
|
odoo/addons/openupgrade_scripts/scripts/calendar/17.0.1.1/upgrade_analysis.txt,sha256=cDu39zIqNTZgZZPI9bWXjBkFfOa3yKd8NbuRYs9rPoQ,1395
|
63
66
|
odoo/addons/openupgrade_scripts/scripts/calendar/17.0.1.1/upgrade_analysis_work.txt,sha256=9Cs4S3AqZ0G10G4K4pSqSLMSwRRGNBTnaJEeu-dy32E,1526
|
64
67
|
odoo/addons/openupgrade_scripts/scripts/calendar_sms/17.0.1.1/upgrade_analysis.txt,sha256=ov0HAtIQqr4W1AZIQ-NMGlXb_gSZsbqm5mq-kn2Zre4,199
|
@@ -74,7 +77,10 @@ odoo/addons/openupgrade_scripts/scripts/delivery/17.0.1.0/upgrade_analysis.txt,s
|
|
74
77
|
odoo/addons/openupgrade_scripts/scripts/delivery_mondialrelay/17.0.0.1/upgrade_analysis.txt,sha256=b8I5lcmNozL7-QxXWat4eRogSuXBKJ2yoDt_hOP1Kqk,186
|
75
78
|
odoo/addons/openupgrade_scripts/scripts/delivery_stock_picking_batch/17.0.1.0/upgrade_analysis.txt,sha256=0-syDUbB9TRxr5bObpQpVaNLL2hJVGF1-JgnNuEoBqA,207
|
76
79
|
odoo/addons/openupgrade_scripts/scripts/digest/17.0.1.1/noupdate_changes.xml,sha256=xwMvzujXqHa9nTQZGs9Wk6zB0UZaWFpWqtS1u6ccaOU,19965
|
80
|
+
odoo/addons/openupgrade_scripts/scripts/digest/17.0.1.1/post-migration.py,sha256=EonEQ1MH5Lrw0Lb47Vy6yZkgGA9ADQ6eizWBgoNycAE,359
|
81
|
+
odoo/addons/openupgrade_scripts/scripts/digest/17.0.1.1/pre-migration.py,sha256=1GmZjVwKN61b9ZqyFevDybz51_MBlB66P35dRagRng0,514
|
77
82
|
odoo/addons/openupgrade_scripts/scripts/digest/17.0.1.1/upgrade_analysis.txt,sha256=oPv4iPppLTf4jX6IovBfLVYGjqEvmWix7HiIjgeSkao,396
|
83
|
+
odoo/addons/openupgrade_scripts/scripts/digest/17.0.1.1/upgrade_analysis_work.txt,sha256=jiHe3jMCLNJJ1cZvVVpq3cV4ggEbyFI7dRL8rJu6nYY,439
|
78
84
|
odoo/addons/openupgrade_scripts/scripts/event/17.0.1.8/noupdate_changes.xml,sha256=LEEyj94Yk0Sr5EyKRglu0OXM2r-LLt1BWcYAqfgi-NQ,52136
|
79
85
|
odoo/addons/openupgrade_scripts/scripts/event/17.0.1.8/upgrade_analysis.txt,sha256=5FaEY5kMt6XA2T3VzU8F5u2CTmh7WZchRjKHl-keSew,4154
|
80
86
|
odoo/addons/openupgrade_scripts/scripts/event_booth/17.0.1.1/noupdate_changes.xml,sha256=iipsblz99fuanBEY661nPirN39O3eOGjW1bT2JwiWss,2381
|
@@ -380,7 +386,10 @@ odoo/addons/openupgrade_scripts/scripts/pos_stripe/17.0.1.0/upgrade_analysis.txt
|
|
380
386
|
odoo/addons/openupgrade_scripts/scripts/pos_viva_wallet/17.0.1.0/upgrade_analysis.txt,sha256=iRc5yKlN7cDEvxOgMzjyO4Ov5p9IERgRXQKSZaZiioo,983
|
381
387
|
odoo/addons/openupgrade_scripts/scripts/privacy_lookup/17.0.1.0/upgrade_analysis.txt,sha256=l6bZO4RUtpRzJYYglTiPCXBa2Lni5Tl4AqAHkL0qU6g,165
|
382
388
|
odoo/addons/openupgrade_scripts/scripts/product/17.0.1.2/noupdate_changes.xml,sha256=RSxFOsd4wdaBB3sPTKLB-280CYCCltUK29A7wt04uvA,990
|
389
|
+
odoo/addons/openupgrade_scripts/scripts/product/17.0.1.2/post-migration.py,sha256=TyvK0jA8ae_vOxn2JfIqNP86zuR0mJOt-8DE47RTA1M,2359
|
390
|
+
odoo/addons/openupgrade_scripts/scripts/product/17.0.1.2/pre-migration.py,sha256=46_CERCDWLR2K4klVEwzg6ZI2dRHNlW1KMsZfZW4JYc,1575
|
383
391
|
odoo/addons/openupgrade_scripts/scripts/product/17.0.1.2/upgrade_analysis.txt,sha256=rBuU0mMaB8rZJOWdY1adG50c-nm79Jw7zPsK3JhPFrY,4637
|
392
|
+
odoo/addons/openupgrade_scripts/scripts/product/17.0.1.2/upgrade_analysis_work.txt,sha256=Nv6HyHtv1Zsd5LnneLJH3kjx_R6XBEwg-URBUKLrBVg,5692
|
384
393
|
odoo/addons/openupgrade_scripts/scripts/product_email_template/17.0.1.0/upgrade_analysis.txt,sha256=Dx6pySBrbJMWmtd4YMb2kJvvwUS13cMjXP0r6zLfLWk,189
|
385
394
|
odoo/addons/openupgrade_scripts/scripts/product_expiry/17.0.1.0/upgrade_analysis.txt,sha256=VADhu7NUifZB0Q9deDB7ZYLYxXIQ4X7XhUAtbFu-nkc,611
|
386
395
|
odoo/addons/openupgrade_scripts/scripts/product_images/17.0.1.0/upgrade_analysis.txt,sha256=ZFdJzO3tOMvoa1XV86Kzqw5uqUSHhXmQjlN8ebFkbS8,165
|
@@ -406,7 +415,10 @@ odoo/addons/openupgrade_scripts/scripts/rating/17.0.1.1/upgrade_analysis.txt,sha
|
|
406
415
|
odoo/addons/openupgrade_scripts/scripts/rating/17.0.1.1/upgrade_analysis_work.txt,sha256=AG_gRxWXjup776lKThpZ4499ojtMVej_7cT_1LN9xr0,1990
|
407
416
|
odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/noupdate_changes.xml,sha256=SsODI46tUtKZGQdz1meM6VsGmT_udVIzdxrWu34fPEs,202
|
408
417
|
odoo/addons/openupgrade_scripts/scripts/repair/17.0.1.0/upgrade_analysis.txt,sha256=9nq-cpzaimD41mz-A6Y30DYJmblITlWDqShK6AYvufg,9290
|
418
|
+
odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/post-migration.py,sha256=WyZ_LtqxscUMf_J7-iANYC0xKxu4ROuAcJbSOPhYaPE,437
|
419
|
+
odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/pre-migration.py,sha256=3LQfmv_8Unj96nxU1aOSYZ2spDpvDiU4WNpmhKPfUAQ,970
|
409
420
|
odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/upgrade_analysis.txt,sha256=rvmI4wkqwRY0Mz3mI_oMf9DsqwKny69cgGNasFv6BpU,854
|
421
|
+
odoo/addons/openupgrade_scripts/scripts/resource/17.0.1.1/upgrade_analysis_work.txt,sha256=hnHgqLc_-gypgYn9cILPKiAyXPJgmhWjAtatUdkQRWY,1131
|
410
422
|
odoo/addons/openupgrade_scripts/scripts/sale/17.0.1.2/noupdate_changes.xml,sha256=wh7d2nRJLcvN16KYMDdTiNqRT0O8siPsNpKlyQGRNxc,13187
|
411
423
|
odoo/addons/openupgrade_scripts/scripts/sale/17.0.1.2/upgrade_analysis.txt,sha256=bzIP0uZgpiCqOmfzU1XVfmbi8wAwbA0OoNAAI2quN2w,6014
|
412
424
|
odoo/addons/openupgrade_scripts/scripts/sale_async_emails/17.0.1.0/upgrade_analysis.txt,sha256=JkvRgvp29pq_FGyqKSyInOfmQf2N9MCheOEXHc_BHfQ,361
|
@@ -509,7 +521,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/17.0.1.0/upgrade_analysi
|
|
509
521
|
odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
|
510
522
|
odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
|
511
523
|
odoo/addons/openupgrade_scripts/static/description/index.html,sha256=iV41-zYBM4uvZPuunpcr7bQeRgBaojVsKo_gkeyJyA4,12639
|
512
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
513
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
514
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
515
|
-
odoo_addon_openupgrade_scripts-17.0.1.0.1.
|
524
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.47.dist-info/METADATA,sha256=Vz5dqBB6EGnuswwSdthLQ5qfXe3U5c2vmNcxqDe1dLg,3785
|
525
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.47.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
|
526
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.47.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
|
527
|
+
odoo_addon_openupgrade_scripts-17.0.1.0.1.47.dist-info/RECORD,,
|
File without changes
|