Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cgscop_incub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
Confédération Générale des SCOP
cgscop_incub
Commits
2ebd467f
Commit
2ebd467f
authored
3 years ago
by
Benjamin - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[update] move migration scripts to 13.0
parent
9da90ea9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
migrations/14.0.1.0.0/post-migration.py
+0
-36
0 additions, 36 deletions
migrations/14.0.1.0.0/post-migration.py
migrations/14.0.1.0.0/pre-migration.py
+0
-17
0 additions, 17 deletions
migrations/14.0.1.0.0/pre-migration.py
with
0 additions
and
53 deletions
migrations/14.0.1.0.0/post-migration.py
deleted
100644 → 0
+
0
−
36
View file @
9da90ea9
# © 2020 Le Filament (<https://www.le-filament.com>)
# © 2020 Confédération Générale des Scop (<https://www.les-scop.coop>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from
openupgradelib
import
openupgrade
PERCENT
=
[
(
0
,
"
0
"
),
(
20
,
"
20
"
),
(
40
,
"
40
"
),
(
60
,
"
60
"
),
(
80
,
"
80
"
),
(
100
,
"
100
"
),
]
def
res_partner_map_values
(
env
):
openupgrade
.
map_values
(
env
.
cr
,
openupgrade
.
get_legacy_name
(
"
incub_sensibilite_coop
"
),
"
incub_sensibilite_coop
"
,
PERCENT
,
table
=
"
res_partner
"
,
)
openupgrade
.
map_values
(
env
.
cr
,
openupgrade
.
get_legacy_name
(
"
incub_percent_realisation
"
),
"
incub_percent_realisation
"
,
PERCENT
,
table
=
"
res_partner
"
,
)
@openupgrade.migrate
()
def
migrate
(
env
,
version
):
ur_month_timesheet_map_values
(
env
)
This diff is collapsed.
Click to expand it.
migrations/14.0.1.0.0/pre-migration.py
deleted
100644 → 0
+
0
−
17
View file @
9da90ea9
# © 2020 Le Filament (<https://www.le-filament.com>)
# © 2020 Confédération Générale des Scop (<https://www.les-scop.coop>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from
openupgradelib
import
openupgrade
column_renames
=
{
"
res_partner
"
:
[
(
"
incub_sensibilite_coop
"
,
None
),
(
"
incub_percent_realisation
"
,
None
),
],
}
@openupgrade.migrate
()
def
migrate
(
env
,
version
):
openupgrade
.
rename_columns
(
env
.
cr
,
column_renames
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment