-
-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b99a8fc
commit 8d12ffb
Showing
5 changed files
with
12 additions
and
52 deletions.
There are no files selected for viewing
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
10 changes: 0 additions & 10 deletions
10
openupgrade_scripts/scripts/sale_stock/15.0.1.0/end-migration.py
This file was deleted.
Oops, something went wrong.
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
20 changes: 1 addition & 19 deletions
20
openupgrade_scripts/scripts/sale_stock/15.0.1.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 |
---|---|---|
@@ -1,24 +1,6 @@ | ||
from openupgradelib import openupgrade | ||
|
||
|
||
def _rename_field_product_packaging_to_product_packaging_id(env): | ||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
ALTER TABLE sale_order_line | ||
ADD COLUMN IF NOT EXISTS product_packaging_id integer | ||
""", | ||
) | ||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
UPDATE sale_order_line | ||
SET product_packaging_id = product_packaging | ||
WHERE product_packaging IS NOT NULL | ||
""", | ||
) | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
_rename_field_product_packaging_to_product_packaging_id(env) | ||
openupgrade.rename_columns(env.cr, {"sale_order": [("effective_date", None)]}) |
8 changes: 5 additions & 3 deletions
8
openupgrade_scripts/scripts/sale_stock/15.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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
---Models in module 'sale_stock'--- | ||
---Fields in module 'sale_stock'--- | ||
sale_stock / sale.order / effective_date (date) : type is now 'datetime' ('date') | ||
# DONE: post-migration: set effective_date = min(pickings.date_done) | ||
# DONE: post-migration: turned into datetime | ||
|
||
sale_stock / sale.order.line / product_packaging (many2one) : DEL relation: product.packaging | ||
# DONE: pre-migration: rename to product_packaging_id, call _onchange_update_product_packaging_qty to compute product_packaging_qty | ||
# NOTHING TO DO: handled in sale | ||
|
||
---XML records in module 'sale_stock'--- | ||
NEW ir.model.access: sale_stock.access_stock_package_type_salesman | ||
DEL ir.ui.view: sale_stock.sale_order_line_view_list | ||
DEL ir.ui.view: sale_stock.sale_stock_report_invoice_document | ||
DEL res.groups: sale_stock.group_lot_on_invoice [renamed to stock_account module] | ||
# NOTHING TO DO | ||
|
||
DEL res.groups: sale_stock.group_lot_on_invoice [renamed to stock_account module] | ||
# NOTHING TO DO: handled in stock_account |