-
-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OU-IMP] purchase: add work file, precreate column, mark done
- Loading branch information
Showing
3 changed files
with
32 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
10 changes: 10 additions & 0 deletions
10
openupgrade_scripts/scripts/purchase/17.0.1.2/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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
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" | ||
) | ||
openupgrade.logged_query(env.cr, "UPDATE purchase_order_line SET discount=0") |
21 changes: 21 additions & 0 deletions
21
openupgrade_scripts/scripts/purchase/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,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 |