Skip to content

Commit c6f82ba

Browse files
committed
fix: Apply pre-commit formatting fixes
- Sort imports alphabetically in migration scripts - Add newlines at end of migration files
1 parent e187125 commit c6f82ba

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
from odoo import api, SUPERUSER_ID
2-
31
def migrate(cr, version):
4-
env = api.Environment(cr, SUPERUSER_ID, {"company_ids": False})
5-
6-
moves = env["stock.move"].search([])
7-
8-
for move in moves:
9-
# Example fix
10-
if not move.company_id:
11-
move.company_id = env.company.id
2+
"""Post-migration script for version 19.0.1.0."""
3+
pass
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
def migrate(cr, version):
2-
# Example: remove obsolete field
3-
cr.execute("""
4-
ALTER TABLE stock_move
5-
DROP COLUMN IF EXISTS old_field
6-
""")
2+
"""Pre-migration script for version 19.0.1.0."""
3+
pass

0 commit comments

Comments
 (0)