forked from OCA/odoo-module-migrator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigrate_100_110.py
More file actions
93 lines (84 loc) · 3.38 KB
/
migrate_100_110.py
File metadata and controls
93 lines (84 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright (C) 2019 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo_module_migrate.base_migration_script import BaseMigrationScript
# TODO: Call 2to3
_TEXT_REPLACES = {
"*": {
r"ir.actions.report.xml": "ir.actions.report",
r"report.external_layout": "web.external_layout",
r"report.html_container": "web.html_container",
r"report.layout": "web.report_layout",
r"report.minimal_layout": "web.minimal_layout",
},
".xml": {
r"kanban_state_selection": "state_selection",
}
}
_TEXT_ERRORS = {
"*": {
"('|\")workflow('|\")":
"[V11] Reference to 'workflow'."
" This model has been removed.",
"('|\")workflow.activity('|\")":
"[V11] Reference to 'workflow.activity'."
" This model has been removed.",
"('|\")workflow.instance('|\")":
"[V11] Reference to'workflow.instance'."
" This model has been removed.",
"('|\")workflow.transition('|\")":
"[V11] Reference to 'workflow.transition'."
" This model has been removed.",
"('|\")workflow.triggers('|\")":
"[V11] Reference to 'workflow.triggers'."
" This model has been removed.",
"('|\")workflow.workitem('|\")":
"[V11] Reference to 'workflow.workitem'."
" This model has been removed.",
"report.external_layout_header":
"report.external_layout_header is obsolete.",
"report.external_layout_footer":
"report.external_layout_footer is obsolete.",
},
".xml": {
r"<tree[\s][^>]*colors=":
"colors attribute is deprecated in tree view."
" Use decoration- instead.",
r"<tree[\s][^>]*fonts=":
"fonts attribute is deprecated in tree view."
" Use decoration- instead.",
}
}
_DEPRECATED_MODULES = [
("account_accountant", "removed"),
("account_tax_cash_basis", "removed"),
("base_action_rule", "renamed", "base_automation"),
("crm_project_issue", "renamed", "crm_project_issue"),
("hr_timesheet_sheet", "oca_moved", "hr_timesheet_sheet",
"Moved to OCA/hr-timesheet"),
("marketing_campaign", "removed"),
("marketing_campaign_crm_demo", "removed"),
("portal_gamification", "merged", "gamification"),
("portal_sale", "merged", "sale"),
("portal_stock", "merged", "portal"),
("procurement", "merged", "stock"),
("project_issue", "merged", "project"),
("project_issue_sheet", "merged", "hr_timesheet"),
("rating_project_issue", "removed"),
("report", "merged", "base"),
("stock_calendar", "removed"),
("stock_picking_wave", "renamed", "stock_picking_batch"),
("subscription", "removed"),
("web_calendar", "merged", "web"),
("web_kanban", "merged", "web"),
("website_issue", "renamed", "website_form_project"),
("website_portal", "merged", "website"),
("website_project", "merged", "project"),
("website_project_issue", "merged", "project"),
("website_project_timesheet", "merged", "hr_timesheet"),
("website_rating_project_issue", "renamed", "website_rating_project"),
]
class MigrationScript(BaseMigrationScript):
_TEXT_REPLACES = _TEXT_REPLACES
_TEXT_ERRORS = _TEXT_ERRORS
_DEPRECATED_MODULES = _DEPRECATED_MODULES