Skip to content
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

[14.0][OU-ADD] sale_stock: Migration scripts #2862

Merged
merged 1 commit into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docsource/modules130-140.rst
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ Module coverage 13.0 -> 14.0
+--------------------------------------------+-------------------------------------------------+
|sale_quotation_builder | |
+--------------------------------------------+-------------------------------------------------+
|sale_stock | |
|sale_stock | Done |
+--------------------------------------------+-------------------------------------------------+
| |new| sale_stock_margin | |
+--------------------------------------------+-------------------------------------------------+
Expand Down
10 changes: 10 additions & 0 deletions openupgrade_scripts/scripts/sale_stock/14.0.1.0/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2021 ForgeFlow S.L. <https://www.forgeflow.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.set_xml_ids_noupdate_value(
env, "sale_stock", ["stock_picking_rule_portal"], True
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---Models in module 'sale_stock'---
---Fields in module 'sale_stock'---
sale_stock / res.users / property_warehouse_id (many2one): NEW relation: stock.warehouse, hasdefault
sale_stock / sale.order.line / warehouse_id (many2one) : not a function anymore
sale_stock / sale.order.line / warehouse_id (many2one) : now related
# NOTHING TO DO

---XML records in module 'sale_stock'---
NEW ir.model.access: sale_stock.access_stock_picking_portal [renamed from stock module]
# NOTHING TO DO: done in stock

ir.rule: sale_stock.stock_picking_rule_portal (noupdate) (noupdate switched)
# DONE: pre-migration: switched noupdate xmlid

DEL ir.model.access: sale_stock.access_product_packaging_manager
NEW ir.ui.view: sale_stock.res_users_view_form
NEW ir.ui.view: sale_stock.res_users_view_form_preferences
NEW ir.ui.view: sale_stock.res_users_view_simple_form
NEW ir.ui.view: sale_stock.sale_order_cancel_view_form_inherit
NEW ir.ui.view: sale_stock.sale_report_product_product_replenishment
# NOTHING TO DO: noupdate=0 ir records