fix in item group on_trash

This commit is contained in:
Anand Doshi 2012-06-12 17:03:09 +05:30
parent bd59c461bc
commit 4f4f58293f

View File

@ -66,7 +66,7 @@ class DocType:
item = sql("select name from `tabItem` where ifnull(item_group, '') = %s", self.doc.name) item = sql("select name from `tabItem` where ifnull(item_group, '') = %s", self.doc.name)
item = [d[0] for d in item] item = [d[0] for d in item]
if ig: if item:
msgprint("""Item Group: %s can not be trashed/deleted because it is used in item: %s. msgprint("""Item Group: %s can not be trashed/deleted because it is used in item: %s.
To trash/delete this, remove/change item group in item master""" % (self.doc.name, item or ''), raise_exception=1) To trash/delete this, remove/change item group in item master""" % (self.doc.name, item or ''), raise_exception=1)