You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.4KB

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