Skip to content

Commit

Permalink
Merge PR #4746 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by MiquelRForgeFlow
  • Loading branch information
OCA-git-bot committed Feb 17, 2025
2 parents 9b0706f + 8ba2748 commit 44ca598
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docsource/modules160-170.rst
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ Module coverage 16.0 -> 17.0
+---------------------------------------------------+----------------------+-------------------------------------------------+
| purchase_requisition_stock | |No DB layout changes. |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| purchase_stock | | |
| purchase_stock | Done | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
| rating | Nothing to do | |
+---------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
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)
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
# NOTHING TO DO

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')
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

0 comments on commit 44ca598

Please sign in to comment.