fixes in tree type documents

This commit is contained in:
Nabin Hait
2013-01-16 13:03:33 +05:30
parent 44ffd4360c
commit 30ab3b40a3
3 changed files with 3 additions and 12 deletions

View File

@@ -37,9 +37,6 @@ class DocType(DocTypeNestedSet):
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",
self.doc.name) self.doc.name)

View File

@@ -33,6 +33,3 @@ class DocType(DocTypeNestedSet):
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()

View File

@@ -33,6 +33,3 @@ class DocType(DocTypeNestedSet):
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()