Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cgscop_account_arescop
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_account_arescop
Commits
8e3e2fc5
Commit
8e3e2fc5
authored
3 years ago
by
migodoo
Browse files
Options
Downloads
Patches
Plain Diff
[fix] migration script
parent
ca8a553e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
migrations/13.0.1.0.0/post-migration.py
+24
-0
24 additions, 0 deletions
migrations/13.0.1.0.0/post-migration.py
with
24 additions
and
0 deletions
migrations/13.0.1.0.0/post-migration.py
0 → 100644
+
24
−
0
View file @
8e3e2fc5
# © 2022 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from
openupgradelib
import
openupgrade
# pylint: disable=W7936
from
psycopg2
import
sql
def
scop_account_arescop_map_values
(
env
):
env
.
cr
.
execute
(
sql
.
SQL
(
"""
UPDATE account_move am
SET
arescop_group_id = ai.arescop_group_id,
is_arescop_invoiced = ai.is_arescop_invoiced
FROM account_invoice ai
WHERE ai.id = am.old_invoice_id;
"""
),
)
@openupgrade.migrate
()
def
migrate
(
env
,
version
):
scop_account_arescop_map_values
(
env
)
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