mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 15:09:20 +00:00
Merge pull request #51374 from mihir-kandoi/gh45169
This commit is contained in:
@@ -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.update_tax_withholding_field_in_payment_entry
|
||||||
erpnext.patches.v16_0.migrate_tax_withholding_data
|
erpnext.patches.v16_0.migrate_tax_withholding_data
|
||||||
erpnext.patches.v16_0.update_corrected_cancelled_status
|
erpnext.patches.v16_0.update_corrected_cancelled_status
|
||||||
|
erpnext.patches.v16_0.fix_barcode_typo
|
||||||
|
|||||||
7
erpnext/patches/v16_0/fix_barcode_typo.py
Normal file
7
erpnext/patches/v16_0/fix_barcode_typo.py
Normal 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()
|
||||||
@@ -484,7 +484,7 @@ class Item(Document):
|
|||||||
)
|
)
|
||||||
if item_barcode.barcode_type:
|
if item_barcode.barcode_type:
|
||||||
barcode_type = convert_erpnext_to_barcodenumber(
|
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 barcode_type in barcodenumber.barcodes():
|
||||||
if not barcodenumber.check_code(barcode_type, item_barcode.barcode):
|
if not barcodenumber.check_code(barcode_type, item_barcode.barcode):
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Barcode Type",
|
"label": "Barcode Type",
|
||||||
"options": "\nEAN\nUPC-A\nCODE-39\nEAN-12\nEAN-8\nGS1\nGTIN\nISBN\nISBN-10\nISBN-13\nISSN\nJAN\nPZN\nUPC"
|
"options": "\nEAN\nUPC-A\nCODE-39\nEAN-13\nEAN-8\nGS1\nGTIN\nGTIN-14\nISBN\nISBN-10\nISBN-13\nISSN\nJAN\nPZN\nUPC"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "uom",
|
"fieldname": "uom",
|
||||||
@@ -37,13 +37,14 @@
|
|||||||
],
|
],
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2024-03-27 13:09:54.217164",
|
"modified": "2025-12-30 12:24:11.749128",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Item Barcode",
|
"name": "Item Barcode",
|
||||||
"naming_rule": "Random",
|
"naming_rule": "Random",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
|
"row_format": "Dynamic",
|
||||||
"sort_field": "creation",
|
"sort_field": "creation",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": [],
|
"states": [],
|
||||||
|
|||||||
@@ -20,10 +20,11 @@ class ItemBarcode(Document):
|
|||||||
"EAN",
|
"EAN",
|
||||||
"UPC-A",
|
"UPC-A",
|
||||||
"CODE-39",
|
"CODE-39",
|
||||||
"EAN-12",
|
"EAN-13",
|
||||||
"EAN-8",
|
"EAN-8",
|
||||||
"GS1",
|
"GS1",
|
||||||
"GTIN",
|
"GTIN",
|
||||||
|
"GTIN-14",
|
||||||
"ISBN",
|
"ISBN",
|
||||||
"ISBN-10",
|
"ISBN-10",
|
||||||
"ISBN-13",
|
"ISBN-13",
|
||||||
|
|||||||
Reference in New Issue
Block a user