Changeset 9117


Ignore:
Timestamp:
28 Aug 2012, 14:02:25 (12 years ago)
Author:
Henrik Bettermann
Message:

Append hash '#' to phone numbers to circumvent unwanted excel automatic

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py

    r8724 r9117  
    8383        elif name == 'history':
    8484            value = value.messages
     85        elif name == 'phone' and value is not None:
     86            # Append hash '#' to phone numbers to circumvent
     87            # unwanted excel automatic
     88            value = str('%s#' % value)
    8589        return super(
    8690            ApplicantsExporter, self).mangle_value(
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_export.py

    r9048 r9117  
    174174            'Application initialized by system\'],'
    175175            'Tester,0,M.,"Some notice\nin lines.",any password,'
    176             '+234-123-12345,123456,f,initialized,,0,dp2011\r\n'
     176            '+234-123-12345#,123456,f,initialized,,0,dp2011\r\n'
    177177            in result)
    178178
     
    198198            'Application initialized by system\'],'
    199199            'Tester,0,M.,"Some notice\nin lines.",any password,'
    200             '+234-123-12345,123456,f,initialized,,0,dp2011\r\n'
    201             in result)
    202         return
     200            '+234-123-12345#,123456,f,initialized,,0,dp2011\r\n'
     201            in result)
     202        return
Note: See TracChangeset for help on using the changeset viewer.