Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion addons/mail/migrations/9.0.1.0/openupgrade_analysis_work.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ mail / res.users / display_groups_suggestions (boolean):
# Nothing to do

---XML records in module 'mail'---
DEL ir.rule: mail.mail_group_public_and_joined
# Done: Remove rule as it's a noupdate record that is not automatically removed

NEW ir.actions.act_window: mail.action_contacts
NEW ir.actions.act_window: mail.action_email_template_tree_all
NEW ir.actions.act_window: mail.action_view_mail_tracking_value
Expand Down Expand Up @@ -148,7 +151,6 @@ DEL ir.model.access: mail.access_mail_notification_user
NEW ir.rule: mail.mail_channel_rule
NEW ir.rule: mail.mail_message_subtype_rule_public
DEL ir.rule: mail.mail_followers_read_write_others
DEL ir.rule: mail.mail_group_public_and_joined
DEL ir.rule: mail.mail_notification_read_write_own
NEW ir.ui.menu: mail.mail_channel_menu_root_chat
NEW ir.ui.menu: mail.mail_channel_menu_settings
Expand Down
15 changes: 9 additions & 6 deletions addons/mail/migrations/9.0.1.0/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@
}


@openupgrade.migrate()
def migrate(cr, version):
@openupgrade.migrate(use_env=True)
def migrate(env, version):
openupgrade.update_module_names(
cr, [('email_template', 'mail')], merge_modules=True,
env.cr, [('email_template', 'mail')], merge_modules=True,
)
openupgrade.rename_models(cr, model_renames)
openupgrade.rename_tables(cr, table_renames)
openupgrade.rename_columns(cr, column_renames)
openupgrade.rename_models(env.cr, model_renames)
openupgrade.rename_tables(env.cr, table_renames)
openupgrade.rename_columns(env.cr, column_renames)
# Remove noupdate ir.rule
rule = env.ref('mail.mail_group_public_and_joined')
rule.unlink()