-
-
Notifications
You must be signed in to change notification settings - Fork 785
[17.0][OU-ADD] purchase: Migration to 17.0 #4699
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 hidden or 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
17 changes: 17 additions & 0 deletions
17
openupgrade_scripts/scripts/purchase/17.0.1.2/post-migration.py
This file contains hidden or 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,17 @@ | ||
| # 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 | ||
|
|
||
|
|
||
| @openupgrade.migrate() | ||
| def migrate(env, version): | ||
| openupgrade.load_data(env, "purchase", "17.0.1.2/noupdate_changes.xml") | ||
| openupgrade.delete_record_translations( | ||
| env.cr, | ||
| "purchase", | ||
| [ | ||
| "email_template_edi_purchase_done", | ||
| "email_template_edi_purchase_reminder", | ||
| ], | ||
| ) | ||
14 changes: 14 additions & 0 deletions
14
openupgrade_scripts/scripts/purchase/17.0.1.2/pre-migration.py
This file contains hidden or 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 @@ | ||
| from openupgradelib import openupgrade | ||
|
|
||
|
|
||
| @openupgrade.migrate() | ||
| def migrate(env, version=None): | ||
| if not openupgrade.column_exists(env.cr, "purchase_order_line", "discount"): | ||
| openupgrade.logged_query( | ||
| env.cr, | ||
| "ALTER TABLE purchase_order_line ADD COLUMN discount FLOAT DEFAULT 0", | ||
| ) | ||
| openupgrade.logged_query( | ||
| env.cr, | ||
| "ALTER TABLE purchase_order_line ALTER COLUMN discount DROP DEFAULT", | ||
| ) |
21 changes: 21 additions & 0 deletions
21
openupgrade_scripts/scripts/purchase/17.0.1.2/upgrade_analysis_work.txt
This file contains hidden or 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,21 @@ | ||
| ---Models in module 'purchase'--- | ||
| ---Fields in module 'purchase'--- | ||
| purchase / purchase.order / activity_user_id (many2one) : not related anymore | ||
| purchase / purchase.order / activity_user_id (many2one) : now a function | ||
| purchase / purchase.order / message_main_attachment_id (many2one): DEL relation: ir.attachment | ||
| purchase / purchase.order / rating_ids (one2many) : NEW relation: rating.rating | ||
| # NOTHING TO DO | ||
|
|
||
| purchase / purchase.order.line / discount (float) : NEW hasdefault: compute | ||
| # DONE: create column in pre-migration to avoid expensive recomputation | ||
|
|
||
| purchase / res.partner / buyer_id (many2one) : NEW relation: res.users | ||
| # NOTHING TO DO | ||
|
|
||
| ---XML records in module 'purchase'--- | ||
| NEW ir.ui.view: purchase.document_tax_totals | ||
| NEW ir.ui.view: purchase.product_template_search_view_purchase | ||
| NEW ir.ui.view: purchase.product_view_kanban_catalog_purchase_only | ||
| NEW ir.ui.view: purchase.product_view_search_catalog | ||
| NEW ir.ui.view: purchase.view_product_product_supplier_inherit | ||
| # 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.
Uh oh!
There was an error while loading. Please reload this page.