mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-05 13:24:47 +00:00
fixes in tree type documents
This commit is contained in:
@@ -35,10 +35,7 @@ class DocType(DocTypeNestedSet):
|
|||||||
(self.doc.customer_group_name)):
|
(self.doc.customer_group_name)):
|
||||||
msgprint("""Another %s record is trashed.
|
msgprint("""Another %s record is trashed.
|
||||||
To untrash please go to Setup -> Recycle Bin.""" %
|
To untrash please go to Setup -> Recycle Bin.""" %
|
||||||
(self.doc.customer_group_name), raise_exception = 1)
|
(self.doc.customer_group_name), raise_exception = 1)
|
||||||
|
|
||||||
super(DocType, self).validate()
|
|
||||||
|
|
||||||
|
|
||||||
def on_trash(self):
|
def on_trash(self):
|
||||||
cust = sql("select name from `tabCustomer` where ifnull(customer_group, '') = %s",
|
cust = sql("select name from `tabCustomer` where ifnull(customer_group, '') = %s",
|
||||||
|
|||||||
@@ -32,7 +32,4 @@ class DocType(DocTypeNestedSet):
|
|||||||
for d in getlist(self.doclist, 'target_details'):
|
for d in getlist(self.doclist, 'target_details'):
|
||||||
if not flt(d.target_qty) and not flt(d.target_amount):
|
if not flt(d.target_qty) and not flt(d.target_amount):
|
||||||
webnotes.msgprint("Either target qty or target amount is mandatory.")
|
webnotes.msgprint("Either target qty or target amount is mandatory.")
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
super(DocType, self).validate()
|
|
||||||
|
|
||||||
@@ -32,7 +32,4 @@ class DocType(DocTypeNestedSet):
|
|||||||
for d in getlist(self.doclist, 'target_details'):
|
for d in getlist(self.doclist, 'target_details'):
|
||||||
if not flt(d.target_qty) and not flt(d.target_amount):
|
if not flt(d.target_qty) and not flt(d.target_amount):
|
||||||
msgprint("Either target qty or target amount is mandatory.")
|
msgprint("Either target qty or target amount is mandatory.")
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
super(DocType, self).validate()
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user