mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-21 11:15:10 +00:00
- code clean
This commit is contained in:
@@ -486,7 +486,7 @@ class Item(WebsiteGenerator):
|
||||
from stdnum import ean
|
||||
if len(self.barcodes) > 0:
|
||||
for item_barcode in self.barcodes:
|
||||
duplicate = frappe.db.sql("""select name from `tabItem Barcode` where barcode = %s and parent != %s""", (item_barcode.barcode, self.name))
|
||||
duplicate = frappe.db.sql("""select parent from `tabItem Barcode` where barcode = %s and parent != %s""", (item_barcode.barcode, self.name))
|
||||
if duplicate:
|
||||
frappe.throw(_("Barcode {0} already used in Item {1}").format(
|
||||
item_barcode.barcode, duplicate[0][0]))
|
||||
|
||||
Reference in New Issue
Block a user