Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0][MIG] calendar #2265

Merged
merged 2 commits into from
Apr 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 7 additions & 7 deletions addons/calendar/migrations/13.0.1.0/noupdate_changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
<odoo>
<record id="alarm_mail_1" model="calendar.alarm">
<field name="name">Email - 3 Hours</field>
<field name="type"/>
<!-- <field name="type"/>-->
<field name="alarm_type">email</field>
</record>
<record id="alarm_mail_2" model="calendar.alarm">
<field name="name">Email - 6 Hours</field>
<field name="type"/>
<!-- <field name="type"/>-->
<field name="alarm_type">email</field>
</record>
<record id="alarm_notif_1" model="calendar.alarm">
<field name="name">Notification - 15 Minutes</field>
<field name="type"/>
<!-- <field name="type"/>-->
<field name="alarm_type">notification</field>
</record>
<record id="alarm_notif_2" model="calendar.alarm">
<field name="name">Notification - 30 Minutes</field>
<field name="type"/>
<!-- <field name="type"/>-->
<field name="alarm_type">notification</field>
</record>
<record id="alarm_notif_3" model="calendar.alarm">
<field name="name">Notification - 1 Hours</field>
<field name="type"/>
<!-- <field name="type"/>-->
<field name="alarm_type">notification</field>
</record>
<record id="alarm_notif_4" model="calendar.alarm">
<field name="name">Notification - 2 Hours</field>
<field name="type"/>
<!-- <field name="type"/>-->
<field name="alarm_type">notification</field>
</record>
<record id="alarm_notif_5" model="calendar.alarm">
<field name="name">Notification - 1 Days</field>
<field name="type"/>
<!-- <field name="type"/>-->
<field name="alarm_type">notification</field>
</record>
<record id="calendar_template_meeting_changedate" model="mail.template">
Expand Down
16 changes: 16 additions & 0 deletions addons/calendar/migrations/13.0.1.0/openupgrade_analysis_work.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---Models in module 'calendar'---
---Fields in module 'calendar'---
calendar / calendar.alarm / alarm_type (selection) : NEW required, selection_keys: ['email', 'notification'], req_default: function, hasdefault
calendar / calendar.alarm / type (selection) : DEL required, selection_keys: ['email', 'notification'], req_default: function
# DONE: pre-migration: renamed fields

calendar / calendar.event / event_tz (selection) : NEW selection_keys: function, hasdefault
# NOTHING TO DO: New field that has default, will be automatically filled
pedrobaeza marked this conversation as resolved.
Show resolved Hide resolved

calendar / mail.activity.type / category (False) : selection_keys is now '['default', 'meeting', 'upload_file']' ('['default', 'meeting']')
# NOTHING TO DO: new features

---XML records in module 'calendar'---
DEL ir.ui.view: calendar.mail_activity_type_view_form
DEL ir.ui.view: calendar.view_calendar_event_form_popup
# NOTHING TO DO
10 changes: 10 additions & 0 deletions addons/calendar/migrations/13.0.1.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2020 ForgeFlow <http://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):
openupgrade.load_data(
env.cr, 'calendar', 'migrations/13.0.1.0/noupdate_changes.xml')
13 changes: 13 additions & 0 deletions addons/calendar/migrations/13.0.1.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2020 ForgeFlow <http://www.forgeflow.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openupgradelib import openupgrade

_field_renames = [
('calendar.alarm ', 'calendar_alarm ', 'type', 'alarm_type'),
]


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_fields(env, _field_renames)
2 changes: 1 addition & 1 deletion odoo/openupgrade/doc/source/modules120-130.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ missing in the new release are marked with |del|.
+----------------------------------------------+-------------------------------------------------+
|bus | Nothing to do |
+----------------------------------------------+-------------------------------------------------+
|calendar | |
|calendar | Done |
+----------------------------------------------+-------------------------------------------------+
|calendar_sms | |
+----------------------------------------------+-------------------------------------------------+
Expand Down