Browse Source

[ADD] Migration scripts for mass_editing

pull/1046/head
mreficent 7 years ago
parent
commit
354c661157
  1. 8
      mass_editing/migrations/9.0.1.0.0/openupgrade_analysis.txt
  2. 14
      mass_editing/migrations/9.0.1.0.0/openupgrade_analysis_work.txt
  3. 17
      mass_editing/migrations/9.0.1.0.0/pre-migration.py

8
mass_editing/migrations/9.0.1.0.0/openupgrade_analysis.txt

@ -0,0 +1,8 @@
---Fields in module 'mass_editing'---
mass_editing / mass.object / model_ids (many2many) : DEL relation: ir.model
mass_editing / mass.object / model_list (char) : NEW
mass_editing / mass.object / ref_ir_act_window (many2one) : DEL relation: ir.actions.act_window
mass_editing / mass.object / ref_ir_act_window_id (many2one): NEW relation: ir.actions.act_window
mass_editing / mass.object / ref_ir_value (many2one) : DEL relation: ir.values
mass_editing / mass.object / ref_ir_value_id (many2one) : NEW relation: ir.values
---XML records in module 'mass_editing'---

14
mass_editing/migrations/9.0.1.0.0/openupgrade_analysis_work.txt

@ -0,0 +1,14 @@
---Fields in module 'mass_editing'---
mass_editing / mass.object / model_ids (many2many) : DEL relation: ir.model
mass_editing / mass.object / model_list (char) : NEW
# NOTHING TO DO
mass_editing / mass.object / ref_ir_act_window (many2one) : DEL relation: ir.actions.act_window
mass_editing / mass.object / ref_ir_act_window_id (many2one): NEW relation: ir.actions.act_window
# Done: pre-migration: Renamed fields.
mass_editing / mass.object / ref_ir_value (many2one) : DEL relation: ir.values
mass_editing / mass.object / ref_ir_value_id (many2one) : NEW relation: ir.values
# Done: pre-migration: Renamed fields.
---XML records in module 'mass_editing'---

17
mass_editing/migrations/9.0.1.0.0/pre-migration.py

@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Eficent <http://www.eficent.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
_field_renames = [
('mass.object', 'mass_object', 'ref_ir_act_window',
'ref_ir_act_window_id'),
('mass.object', 'mass_object', 'ref_ir_value', 'ref_ir_value_id'),
]
@openupgrade.migrate(use_env=True)
def migrate(env, version):
openupgrade.rename_fields(env, _field_renames)
Loading…
Cancel
Save