Skip to content

Commit

Permalink
Merge pull request #3934 from locdang8/v16_mig_barcodes_gs1_nomenclature
Browse files Browse the repository at this point in the history
[16.0] [OU-ADD] barcode_gs1_nomenclature: update fields
  • Loading branch information
MiquelRForgeFlow authored Jul 13, 2023
2 parents fc4a888 + 77aadef commit 4cc41b5
Show file tree
Hide file tree
Showing 4 changed files with 43 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 @@ -64,7 +64,7 @@ Module coverage 15.0 -> 16.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| barcodes | Nothing to do |No DB layout changes. |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| barcodes_gs1_nomenclature | | |
| barcodes_gs1_nomenclature | Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| base | Done (partial) | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(
env.cr, "barcodes_gs1_nomenclature", "16.0.1.0/noupdate_changes.xml"
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from openupgradelib import openupgrade


def set_type(env):
openupgrade.logged_query(
env.cr,
"""
UPDATE barcode_rule
SET type = 'pack_date'
WHERE type = 'packaging_date'
""",
)


@openupgrade.migrate()
def migrate(env, version):
set_type(env)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---Models in module 'barcodes_gs1_nomenclature'---
---Fields in module 'barcodes_gs1_nomenclature'---
barcodes_gs1_nomenclature / barcode.rule / type (False) : selection_keys is now '['alias', 'expiration_date', 'location', 'location_dest', 'lot', 'pack_date', 'package', 'package_type', 'product', 'quantity', 'use_date']' ('['alias', 'expiration_date', 'location', 'location_dest', 'lot', 'package', 'package_type', 'packaging_date', 'product', 'quantity', 'use_date']')

# DONE: update type value = packaging_date to pack_date

---XML records in module 'barcodes_gs1_nomenclature'---
NEW barcode.rule: barcodes_gs1_nomenclature.barcode_rule_gs1_314y (noupdate)
NEW barcode.rule: barcodes_gs1_nomenclature.barcode_rule_gs1_320y (noupdate)
NEW barcode.rule: barcodes_gs1_nomenclature.barcode_rule_gs1_322y (noupdate)
NEW barcode.rule: barcodes_gs1_nomenclature.barcode_rule_gs1_323y (noupdate)
NEW barcode.rule: barcodes_gs1_nomenclature.barcode_rule_gs1_351y (noupdate)
NEW barcode.rule: barcodes_gs1_nomenclature.barcode_rule_gs1_360y (noupdate)
NEW barcode.rule: barcodes_gs1_nomenclature.barcode_rule_gs1_361y (noupdate)
NEW barcode.rule: barcodes_gs1_nomenclature.barcode_rule_gs1_364y (noupdate)

# NOTHING TO DO

0 comments on commit 4cc41b5

Please sign in to comment.