From 8dc65af2af775131370e30dc8442bc88a2fa8433 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 29 Aug 2011 16:42:24 +0530 Subject: [PATCH] removed custom fld mapping code: redundant --- .../core/doctype/doctype_mapper/doctype_mapper.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/cgi-bin/core/doctype/doctype_mapper/doctype_mapper.py b/cgi-bin/core/doctype/doctype_mapper/doctype_mapper.py index 1e64c6c4e3..b9b3382ec0 100644 --- a/cgi-bin/core/doctype/doctype_mapper/doctype_mapper.py +++ b/cgi-bin/core/doctype/doctype_mapper/doctype_mapper.py @@ -28,14 +28,6 @@ class DocType: def autoname(self): self.doc.name = make_autoname(self.doc.from_doctype + '-' + self.doc.to_doctype) - # Map Custom Fields - # ------------------ - def map_custom_fields(self, from_doctype, to_doctype, from_doc, to_doc): - fld_list = [] - for d in sql("select fieldname from `tabCustom Field` where dt = %s and docstatus != 2",from_doctype): - if sql("select fieldname from `tabCustom Field` where dt = %s and fieldname = %s and docstatus != 2",(to_doctype, d[0])): - fld_list.append([d[0], d[0], 'Yes']) - self.set_value(fld_list, from_doc, to_doc) def map_fields_with_same_name(self, from_doctype, to_doctype, from_doc, to_doc, fld_list): """ @@ -115,8 +107,7 @@ class DocType: self.map_fields_with_same_name(from_doctype, to_doctype, from_doc, to_doc, fld_list) # Maps field in parent self.set_value(fld_list, from_doc, to_doc) - # Map custom fields - self.map_custom_fields(from_doctype, to_doctype, from_doc, to_doc) + # Parent to child OR child to child mapping else: @@ -135,8 +126,7 @@ class DocType: self.map_fields_with_same_name(from_table_name, t[1], d, ch, fld_list) # Map values self.set_value(fld_list, d, ch) - # Map custom fields - self.map_custom_fields(from_table_name, t[1], d, ch) + # Required when called from server side for refreshing table