-
-
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.
[OU-ADD] purchase: migration to 16.0
- Loading branch information
1 parent
0cf87c6
commit 06448d1
Showing
4 changed files
with
61 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
12 changes: 12 additions & 0 deletions
12
openupgrade_scripts/scripts/purchase/16.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,12 @@ | ||
# Copyright 2024 Le Filament | ||
# 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.cr, "purchase", "16.0.1.2/noupdate_changes.xml") | ||
openupgrade.delete_records_safely_by_xml_id( | ||
env, | ||
["purchase.mail_notification_confirm"], | ||
) |
14 changes: 14 additions & 0 deletions
14
openupgrade_scripts/scripts/purchase/16.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,14 @@ | ||
# Copyright 2024 Le Filament | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade, openupgrade_160 | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade_160.fill_analytic_distribution( | ||
env, | ||
table="purchase_order_line", | ||
m2m_rel="account_analytic_tag_purchase_order_line_rel", | ||
m2m_column1="purchase_order_line_id", | ||
analytic_account_column="account_analytic_id", | ||
) |
34 changes: 34 additions & 0 deletions
34
openupgrade_scripts/scripts/purchase/16.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,34 @@ | ||
---Models in module 'purchase'--- | ||
---Fields in module 'purchase'--- | ||
purchase / account.analytic.applicability / business_domain (False) : NEW selection_keys: ['bill', 'expense', 'general', 'invoice', 'purchase_order'], mode: modify | ||
# NOTHING TO DO: extra selection will be added by ORM | ||
|
||
purchase / product.category / property_account_creditor_price_difference_categ (many2one): module is now 'purchase_price_diff' ('purchase') | ||
purchase / product.product / property_account_creditor_price_difference (many2one): module is now 'purchase_price_diff' ('purchase') | ||
purchase / product.template / property_account_creditor_price_difference (many2one): module is now 'purchase_price_diff' ('purchase') | ||
# NOTHING TO DO: will be handled by ORM | ||
|
||
purchase / purchase.order.line / account_analytic_id (many2one): DEL relation: account.analytic.account | ||
purchase / purchase.order.line / analytic_distribution (json) : NEW hasdefault: compute | ||
purchase / purchase.order.line / analytic_distribution_search (json): NEW | ||
purchase / purchase.order.line / analytic_precision (integer) : NEW hasdefault: default | ||
purchase / purchase.order.line / analytic_tag_ids (many2many) : DEL relation: account.analytic.tag | ||
# DONE: fast fill analytic_distribution in pre-migration | ||
|
||
---XML records in module 'purchase'--- | ||
DEL ir.ui.view: purchase.mail_notification_confirm (noupdate) | ||
# DONE: post-migration: remove noupdate view | ||
|
||
DEL ir.actions.act_window: purchase.purchase_action_dashboard_kanban | ||
DEL ir.actions.act_window: purchase.purchase_action_dashboard_list | ||
DEL ir.model.access: purchase.access_account_type | ||
DEL ir.ui.view: purchase.product_template_form_view | ||
DEL ir.ui.view: purchase.view_category_property_form | ||
# NOTHING TO DO : will be deleted by ORM | ||
|
||
NEW ir.actions.act_window: purchase.action_purchase_history | ||
NEW ir.model.access: purchase.access_product_tag_purchase_manager | ||
NEW ir.ui.view: purchase.purchase_history_tree | ||
NEW ir.ui.view: purchase.purchase_order_view_kanban_without_dashboard | ||
NEW mail.message.subtype: purchase.mt_rfq_sent (noupdate) | ||
# NOTHING TO DO : will be created by ORM |