-
-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][OU-ADD] purchase_stock: Migration to 17.0 #4644
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||
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') | ||
# NOTHING TO DO: handle by ORM | ||
|
||
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right.