def _process_fields(self):
try:<EOL><INDENT>try:<EOL><INDENT>if self.has_key(self.customFieldName):<EOL><INDENT>self[self.customFieldName] = [ c for c in self[self.customFieldName] if c['<STR_LIT>']['<STR_LIT:state>']!="<STR_LIT>" ]<EOL>for custom in self[self.customFieldName]:<EOL><INDENT>field_name = custom['<STR_LIT>']['<STR_LIT:name>']<EOL>field_id = custom['<STR_LIT>']['<STR_LIT:id>']<EOL>if custom['<STR_LIT>'] != -<NUM_LIT:1>:<EOL><INDENT>field_name += '<STR_LIT:_>'+str(custom['<STR_LIT>'])<EOL>field_id += '<STR_LIT:_>'+str(custom['<STR_LIT>'])<EOL><DEDENT>custom['<STR_LIT:name>'] = field_name<EOL>custom['<STR_LIT:id>'] = field_id<EOL>try:<EOL><INDENT>self[field_name] = custom['<STR_LIT:value>']<EOL>self[field_id] = custom['<STR_LIT:value>']<EOL><DEDENT>except KeyError:<EOL><INDENT>self[field_name] = custom['<STR_LIT>']<EOL>self[field_id] = custom['<STR_LIT>']<EOL>custom['<STR_LIT:value>']  = custom['<STR_LIT>']<EOL><DEDENT><DEDENT><DEDENT><DEDENT>except (AttributeError, TypeError):<EOL><INDENT>pass<EOL><DEDENT>for k,v in self.items():<EOL><INDENT>try:<EOL><INDENT>self[k] = v.strip()<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT>except NotImplementedError:<EOL><INDENT>pass<EOL><DEDENT>
Default info massage to appropiate format/style.

        This processing is called on preprocess and postprocess, AKA
        before and after conversion of fields to appropiate
        format/style.

        Perfect example: custom fields on certain objects is a mess
        (IMHO) when retrieved from Mambu, so some easiness is
        implemented here to access them. See some of this objects
        modules and pydocs for further info.

        Tasks done here:

        - Each custom field is given a 'name' key that holds the field
          name, and for each keyed name, the value of the custom field is
          assigned. Each pair of custom field name/value is entered as a
          new property on the main dictionary, allowing an easy access to
          them, not nested inside a pretty dark 'customInformation/Values'
          list.

        - Every item on the attrs dictionary gets stripped from trailing
          spaces (useful when users make typos).

        PLEASE REMEMBER! whenever you call postprocess on inherited
        classes you should call this method too, or else you lose the
        effect of the tasks done here.