fix: add missing patch

This commit is contained in:
Mihir Kandoi
2025-12-30 10:51:28 +05:30
parent 43cdca950f
commit b8ecefa06c
3 changed files with 9 additions and 2 deletions

View File

@@ -455,4 +455,4 @@ erpnext.patches.v16_0.set_mr_picked_qty
erpnext.patches.v16_0.update_tax_withholding_field_in_payment_entry
erpnext.patches.v16_0.migrate_tax_withholding_data
erpnext.patches.v16_0.update_corrected_cancelled_status
erpnext.patches.v16_0.fix_barcode_typo

View File

@@ -0,0 +1,7 @@
import frappe
def execute():
frappe.qb.update("Item Barcode").set("barcode_type", "EAN-13").where(
frappe.qb.Field("barcode_type") == "EAN-12"
).run()

View File

@@ -484,7 +484,7 @@ class Item(Document):
)
if item_barcode.barcode_type:
barcode_type = convert_erpnext_to_barcodenumber(
item_barcode.barcode_type.upper(), item_barcode.barcode
item_barcode.barcode_type.replace("-", "").upper(), item_barcode.barcode
)
if barcode_type in barcodenumber.barcodes():
if not barcodenumber.check_code(barcode_type, item_barcode.barcode):