-
-
Notifications
You must be signed in to change notification settings - Fork 707
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OU-ADD] repair: Migration scripts for v16
- Loading branch information
1 parent
0cf87c6
commit e8f1479
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
openupgrade_scripts/scripts/repair/16.0.1.0/post-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,14 @@ | ||
# Copyright 2024 Le Filament | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
def _compute_repair_price_total(env, model): | ||
fees = env[model].search([]) | ||
fees._compute_price_total_and_subtotal() | ||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.load_data(env.cr, "resource", "16.0.1.0/noupdate_changes.xml") | ||
_compute_repair_price_total(env, "repair.fee") | ||
_compute_repair_price_total(env, "repair.line") |
26 changes: 26 additions & 0 deletions
26
openupgrade_scripts/scripts/repair/16.0.1.0/upgrade_analysis_work.txt
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,26 @@ | ||
---Models in module 'repair'--- | ||
---Fields in module 'repair'--- | ||
repair / repair.fee / price_total (float) : is now stored | ||
repair / repair.line / price_total (float) : is now stored | ||
# DONE: recomputed in post_migration | ||
|
||
repair / repair.line / lot_id (many2one) : relation is now 'stock.lot' ('stock.production.lot') [nothing to do] | ||
repair / repair.order / lot_id (many2one) : relation is now 'stock.lot' ('stock.production.lot') [nothing to do] | ||
# NOTHING TO DO: renaming done in stock | ||
|
||
repair / repair.order / location_id (many2one) : now a function | ||
repair / repair.order / product_uom (many2one) : now a function | ||
# NOTHING TO DO: field already existed (was a onchange) | ||
|
||
repair / repair.order / picking_id (many2one) : NEW relation: stock.picking | ||
repair / stock.picking / repair_ids (one2many) : NEW relation: repair.order | ||
# NOTHING TO DO: new relation | ||
|
||
repair / stock.picking.type / is_repairable (boolean) : NEW hasdefault: compute | ||
repair / stock.picking.type / return_type_of_ids (one2many) : NEW relation: stock.picking.type | ||
# NOTHING TO DO: new fields | ||
|
||
---XML records in module 'repair'--- | ||
NEW ir.ui.view: repair.repair_view_picking_form | ||
NEW ir.ui.view: repair.repair_view_picking_type_form | ||
# NOTHING TO DO |