-
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
account_cutoff_start_end_dates: forecast is now a specific state
To simplify the code and the user interface, the forecast mode doesn't use a boolean field any more; it is now a specific "state". Migration script is provided.
- Loading branch information
1 parent
363ab49
commit f71ee61
Showing
3 changed files
with
59 additions
and
82 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
account_cutoff_start_end_dates/migrations/16.0.1.0.0/pre-migration.py
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright 2023 Akretion France (http://www.akretion.com/) | ||
# @author: Alexis de Lattre <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
|
||
def migrate(cr, version): | ||
if not version: | ||
return | ||
|
||
cr.execute( | ||
"UPDATE account_cutoff SET state='forecast' " | ||
"WHERE state='draft' AND forecast is true" | ||
) |
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