-
-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Don't overwrite renamed field `alarm_type` in noupdate changes. * Make sure `event_tz` field is empty for preserving previous behavior.
- Loading branch information
1 parent
4e8878b
commit 3110d99
Showing
2 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
# Copyright 2020 ForgeFlow <http://www.forgeflow.com> | ||
# Copyright 2020 Tecnativa - Pedro M. Baeza | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
|
||
def _empty_calendar_event_tz(env): | ||
"""Make sure event tz is empty for equal behavior as in v12.""" | ||
openupgrade.logged_query( | ||
env.cr, | ||
"UPDATE calendar_event set event_tz = NULL WHERE event_tz IS NOT NULL", | ||
) | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
_empty_calendar_event_tz(env) | ||
openupgrade.load_data( | ||
env.cr, 'calendar', 'migrations/13.0.1.0/noupdate_changes.xml') |