- code clean
This commit is contained in:
parent
a04c756913
commit
01953135c5
@ -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]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user