Subversion Repositories SmartDukaan

Rev

Rev 15306 | Rev 15308 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15306 Rev 15307
Line 979... Line 979...
979
            data[classkey] = obj.__class__.__name__
979
            data[classkey] = obj.__class__.__name__
980
        return data
980
        return data
981
    else:
981
    else:
982
        return obj
982
        return obj
983
    
983
    
984
def getRetailerObj(retailer, otherContacts=[]):
984
def getRetailerObj(retailer, otherContacts1=[]):
985
    otherContacts = [] if otherContacts is None else otherContacts
985
    otherContacts1 = [] if otherContacts1 is None else otherContacts1
986
    print "otherContacts",otherContacts
986
    print "otherContacts1",otherContacts1
987
    obj = Mock()
987
    obj = Mock()
988
    obj.title = retailer.title
988
    obj.title = retailer.title
989
    obj.id = retailer.id
989
    obj.id = retailer.id
990
    if retailer.contact1 is not None and retailer.contact1 not in otherContacts:
990
    if retailer.contact1 is not None and retailer.contact1 not in otherContacts1:
991
        otherContacts.append(retailer.contact1)
991
        otherContacts1.append(retailer.contact1)
992
    if retailer.contact2 is not None and retailer.contact2 not in otherContacts:
992
    if retailer.contact2 is not None and retailer.contact2 not in otherContacts1:
993
        otherContacts.append(retailer.contact2)
993
        otherContacts1.append(retailer.contact2)
994
    obj.address = retailer.address_new if retailer.address_new is not None else retailer.address
994
    obj.address = retailer.address_new if retailer.address_new is not None else retailer.address
995
    obj.contact1 = otherContacts[0]
995
    obj.contact1 = otherContacts1[0]
996
    obj.contact2 = None if len(otherContacts)==1 else otherContacts[1]
996
    obj.contact2 = None if len(otherContacts1)==1 else otherContacts1[1]
997
    obj.scheduled = (retailer.call_priority is not None)
997
    obj.scheduled = (retailer.call_priority is not None)
998
    return obj
998
    return obj
999
 
999
 
1000
def make_tiny(code):
1000
def make_tiny(code):
1001
    url = 'https://play.google.com/store/apps/details?id=com.saholic.profittill&referrer=utm_source%3D0%26utm_medium%3DCRM%26utm_term%3D001%26utm_campaign%3D' + code
1001
    url = 'https://play.google.com/store/apps/details?id=com.saholic.profittill&referrer=utm_source%3D0%26utm_medium%3DCRM%26utm_term%3D001%26utm_campaign%3D' + code