Skip to content

Commit

Permalink
[MIG] sales_team
Browse files Browse the repository at this point in the history
  • Loading branch information
MiquelRForgeFlow committed Jul 7, 2021
1 parent 014e1ed commit c88ad21
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docsource/modules130-140.rst
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ Module coverage 13.0 -> 14.0
+--------------------------------------------+-------------------------------------------------+
|sale_timesheet_purchase | |
+--------------------------------------------+-------------------------------------------------+
|sales_team | |
|sales_team | Done |
+--------------------------------------------+-------------------------------------------------+
|sms | |
+--------------------------------------------+-------------------------------------------------+
Expand Down
23 changes: 23 additions & 0 deletions openupgrade_scripts/scripts/sales_team/14.0.1.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2021 ForgeFlow S.L. <https://www.forgeflow.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
if openupgrade.table_exists(env.cr, "crm_lead_tag"):
openupgrade.rename_models(
env.cr,
[
("crm.lead.tag", "crm.tag"),
],
)
openupgrade.rename_tables(
env.cr,
[
("crm_lead_tag", "crm_tag"),
],
)
openupgrade.set_xml_ids_noupdate_value(
env, "sales_team", ["crm_rule_all_salesteam", "sale_team_comp_rule"], True
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---Models in module 'sales_team'---
new model crm.tag (renamed from crm.lead.tag in module crm)
# DONE: pre-migration: renamed model and tables

---Fields in module 'sales_team'---
sales_team / crm.lead.tag / __last_update (datetime) : previously in module crm
sales_team / crm.lead.tag / _order : previously in module crm
sales_team / crm.lead.tag / color (integer) : previously in module crm
sales_team / crm.lead.tag / display_name (char) : previously in module crm
sales_team / crm.lead.tag / name (char) : previously in module crm
# NOTHING TO DO

---XML records in module 'sales_team'---
NEW ir.actions.act_window: sales_team.sales_team_crm_tag_action
NEW ir.model.access: sales_team.access_crm_tag
NEW ir.model.access: sales_team.access_crm_tag_manager
NEW ir.model.access: sales_team.access_crm_tag_salesman
# NOTHING TO DO

ir.rule: sales_team.crm_rule_all_salesteam (noupdate) (noupdate switched)
ir.rule: sales_team.sale_team_comp_rule (noupdate) (noupdate switched)
# DONE: pre-migration: switched noupdate

NEW ir.ui.view: sales_team.sales_team_crm_tag_view_form
NEW ir.ui.view: sales_team.sales_team_crm_tag_view_tree
# NOTHING TO DO

0 comments on commit c88ad21

Please sign in to comment.