Skip to content

Commit

Permalink
[OU-ADD] product
Browse files Browse the repository at this point in the history
Renamed field name -> partner_id from model product.supplierinfo
  • Loading branch information
remytms committed May 18, 2023
1 parent 3ebc931 commit 9024ffc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docsource/modules150-160.rst
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ Module coverage 15.0 -> 16.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| |new| privacy_lookup | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| product | | |
| product | Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| product_email_template | |No DB layout changes. |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
14 changes: 14 additions & 0 deletions openupgrade_scripts/scripts/product/16.0.1.2/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 Coop IT Easy
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


_field_renames = [
("product.supplierinfo", "product_supplierinfo", "name", "partner_id"),
]


@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_fields(env, _field_renames)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---Models in module 'product'---
new model product.tag
# NOTHING TO DO: new feature
---Fields in module 'product'---
product / product.product / additional_product_tag_ids (many2many): NEW relation: product.tag
# NOTHING TO DO: new feature
product / product.supplierinfo / name (many2one) : DEL relation: res.partner, required
product / product.supplierinfo / partner_id (many2one) : NEW relation: res.partner, required
# DONE: rename name -> partner_id
product / product.tag / color (integer) : NEW hasdefault: default
product / product.tag / name (char) : NEW required
product / product.tag / product_product_ids (many2many): NEW relation: product.product
product / product.tag / product_template_ids (many2many): NEW relation: product.template
# NOTHING TO DO: news fields on new model product.tag
product / product.template / pricelist_id (many2one) : DEL relation: product.pricelist
# NOTHING TO DO: technical field not needed anymore
product / product.template / product_tag_ids (many2many) : NEW relation: product.tag
# NOTHING TO DO: new fields related to new model product.tag
---XML records in module 'product'---
NEW ir.actions.act_window: product.product_tag_action
NEW ir.model.access: product.access_product_tag_manager
NEW ir.model.access: product.access_product_tag_user
NEW ir.model.constraint: product.constraint_product_packaging_barcode_uniq
NEW ir.model.constraint: product.constraint_product_tag_name_uniq
DEL ir.model.constraint: product.constraint_product_product_barcode_uniq
NEW ir.ui.view: product.product_tag_form_view
NEW ir.ui.view: product.product_tag_tree_view
DEL ir.ui.view: product.product_pricelist_view_inherit
# NOTHING TO DO

0 comments on commit 9024ffc

Please sign in to comment.