Subversion Repositories SmartDukaan

Rev

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

Rev 15278 Rev 15279
Line 978... Line 978...
978
            data[classkey] = obj.__class__.__name__
978
            data[classkey] = obj.__class__.__name__
979
        return data
979
        return data
980
    else:
980
    else:
981
        return obj
981
        return obj
982
    
982
    
983
def getRetailerObj(retailer, otherContacts=None):
983
def getRetailerObj(retailer, otherContacts=[]):
984
    obj = Mock()
984
    obj = Mock()
985
    obj.title = retailer.title
985
    obj.title = retailer.title
986
    if otherContacts:
-
 
987
        if retailer.contact1 is not None and retailer.contact1 not in otherContacts:
986
    if retailer.contact1 is not None and retailer.contact1 not in otherContacts:
988
            otherContacts.append(retailer.contact1)
987
        otherContacts.append(retailer.contact1)
989
        if retailer.contact2 is not None and retailer.contact2 not in otherContacts:
988
    if retailer.contact2 is not None and retailer.contact2 not in otherContacts:
990
            otherContacts.append(retailer.contact2)
989
        otherContacts.append(retailer.contact2)
991
    obj.address = retailer.address_new if retailer.address_new is not None else retailer.address
990
    obj.address = retailer.address_new if retailer.address_new is not None else retailer.address
992
    obj.id = retailer.id
991
    obj.contact1 = otherContacts[0]
-
 
992
    obj.contact2 = None if len(otherContacts)==1 else otherContacts[1]
993
    obj.scheduled = (retailer.call_priority is not None)
993
    obj.scheduled = (retailer.call_priority is not None)
994
    return obj
994
    return obj
995
 
995
 
996
def make_tiny(code):
996
def make_tiny(code):
997
    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
997
    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