-
-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by MiquelRForgeFlow
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
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
22 changes: 22 additions & 0 deletions
22
openupgrade_scripts/scripts/purchase_stock/17.0.1.2/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,22 @@ | ||
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
|
||
def _purchase_stock_convert_created_purchase_line_id_m2o_to_m2m(env): | ||
""" | ||
Convert m2o to m2m in 'purchase.stock' | ||
""" | ||
openupgrade.m2o_to_x2m( | ||
env.cr, | ||
env["stock.move"], | ||
"stock_move", | ||
"created_purchase_line_ids", | ||
"created_purchase_line_id", | ||
) | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
_purchase_stock_convert_created_purchase_line_id_m2o_to_m2m(env) |
23 changes: 23 additions & 0 deletions
23
openupgrade_scripts/scripts/purchase_stock/17.0.1.2/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,23 @@ | ||
---Models in module 'purchase_stock'--- | ||
---Fields in module 'purchase_stock'--- | ||
purchase_stock / product.category / property_account_creditor_price_difference_categ (many2one): previously in module purchase_price_diff | ||
purchase_stock / product.product / property_account_creditor_price_difference (many2one): previously in module purchase_price_diff | ||
purchase_stock / product.template / property_account_creditor_price_difference (many2one): previously in module purchase_price_diff | ||
# NOTHING TO DO | ||
|
||
purchase_stock / purchase.order.line / move_dest_ids (one2many) : table is now 'stock_move_created_purchase_line_rel' ('False') | ||
purchase_stock / purchase.order.line / move_dest_ids (one2many) : type is now 'many2many' ('one2many') | ||
purchase_stock / stock.move / created_purchase_line_id (many2one): DEL relation: purchase.order.line | ||
purchase_stock / stock.move / created_purchase_line_ids (many2many): NEW relation: purchase.order.line | ||
# DONE post-migration: convert from m2o to m2m | ||
|
||
---XML records in module 'purchase_stock'--- | ||
NEW ir.ui.view: purchase_stock.product_template_form_view | ||
NEW ir.ui.view: purchase_stock.product_view_kanban_catalog_purchase_only | ||
NEW ir.ui.view: purchase_stock.stock_reorder_report_search_inherited_purchase_stock | ||
NEW ir.ui.view: purchase_stock.view_category_property_form | ||
NEW ir.ui.view: purchase_stock.view_product_replenish_form_inherit_stock | ||
# NOTHING TO DO: new feature | ||
|
||
DEL ir.ui.view: purchase_stock.purchase_report_product_product_replenishment | ||
# NOTHING TO DO |