[mappers] cleanup, remove dt_map, map_doclist and other such functions

This commit is contained in:
Rushabh Mehta
2013-07-08 11:08:27 +05:30
parent ed23cca9d3
commit a2a1ec765b
25 changed files with 75 additions and 213 deletions

View File

@@ -194,7 +194,7 @@ class DocType(TransactionBase):
# Validate values with reference document
#----------------------------------------
def validate_reference_value(self):
get_obj('DocType Mapper', 'Sales Order-Maintenance Schedule', with_children = 1).validate_reference_value(self, self.doc.name)
pass
def validate_serial_no(self):
for d in getlist(self.doclist, 'item_maintenance_detail'):

View File

@@ -42,10 +42,10 @@ class DocType(TransactionBase):
def validate_reference_value(self, check_for):
if check_for == 'Sales Order':
get_obj('DocType Mapper', 'Sales Order-Maintenance Visit', with_children = 1).validate_reference_value(self, self.doc.name)
pass
elif check_for == 'Customer Issue':
get_obj('DocType Mapper', 'Customer Issue-Maintenance Visit', with_children = 1).validate_reference_value(self, self.doc.name)
pass
def validate_serial_no(self):
for d in getlist(self.doclist, 'maintenance_visit_details'):
if d.serial_no and not sql("select name from `tabSerial No` where name = '%s' and docstatus != 2" % d.serial_no):