From 30ab3b40a327043557ca966410b691878862c46a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 16 Jan 2013 13:03:33 +0530 Subject: [PATCH] fixes in tree type documents --- setup/doctype/customer_group/customer_group.py | 5 +---- setup/doctype/sales_person/sales_person.py | 5 +---- setup/doctype/territory/territory.py | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/setup/doctype/customer_group/customer_group.py b/setup/doctype/customer_group/customer_group.py index cf126b8c07e..f13690d93d8 100644 --- a/setup/doctype/customer_group/customer_group.py +++ b/setup/doctype/customer_group/customer_group.py @@ -35,10 +35,7 @@ class DocType(DocTypeNestedSet): (self.doc.customer_group_name)): msgprint("""Another %s record is trashed. To untrash please go to Setup -> Recycle Bin.""" % - (self.doc.customer_group_name), raise_exception = 1) - - super(DocType, self).validate() - + (self.doc.customer_group_name), raise_exception = 1) def on_trash(self): cust = sql("select name from `tabCustomer` where ifnull(customer_group, '') = %s", diff --git a/setup/doctype/sales_person/sales_person.py b/setup/doctype/sales_person/sales_person.py index 943e724c9b9..65e7ac14abc 100644 --- a/setup/doctype/sales_person/sales_person.py +++ b/setup/doctype/sales_person/sales_person.py @@ -32,7 +32,4 @@ class DocType(DocTypeNestedSet): for d in getlist(self.doclist, 'target_details'): if not flt(d.target_qty) and not flt(d.target_amount): webnotes.msgprint("Either target qty or target amount is mandatory.") - raise Exception - - super(DocType, self).validate() - \ No newline at end of file + raise Exception \ No newline at end of file diff --git a/setup/doctype/territory/territory.py b/setup/doctype/territory/territory.py index 4b6468e6633..6d2da6a3366 100644 --- a/setup/doctype/territory/territory.py +++ b/setup/doctype/territory/territory.py @@ -32,7 +32,4 @@ class DocType(DocTypeNestedSet): for d in getlist(self.doclist, 'target_details'): if not flt(d.target_qty) and not flt(d.target_amount): msgprint("Either target qty or target amount is mandatory.") - raise Exception - - super(DocType, self).validate() - \ No newline at end of file + raise Exception \ No newline at end of file