Subversion Repositories SmartDukaan

Rev

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

Rev 10097 Rev 10207
Line 1097... Line 1097...
1097
            sheet.write(sheet_iterator, 6, math.ceil(mpHistory.ourSellingPrice+max(10,.01*mpHistory.ourSellingPrice)))
1097
            sheet.write(sheet_iterator, 6, math.ceil(mpHistory.ourSellingPrice+max(10,.01*mpHistory.ourSellingPrice)))
1098
        sheet_iterator+=1
1098
        sheet_iterator+=1
1099
    
1099
    
1100
    filename = "/tmp/snapdeal-report-"+runType+" " + str(timestamp) + ".xls"
1100
    filename = "/tmp/snapdeal-report-"+runType+" " + str(timestamp) + ".xls"
1101
    wbk.save(filename)
1101
    wbk.save(filename)
-
 
1102
    try:
1102
    #EmailAttachmentSender.mail("build@shop2020.in", "cafe@nes", ["kshitij.sood@saholic.com"], " Snapdeal Auto Pricing "+runType+" " + str(timestamp), "", [get_attachment_part(filename)], [""], [])
1103
        #EmailAttachmentSender.mail("build@shop2020.in", "cafe@nes", ["kshitij.sood@saholic.com"], " Snapdeal Auto Pricing "+runType+" " + str(timestamp), "", [get_attachment_part(filename)], [""], [])
1103
    EmailAttachmentSender.mail("build@shop2020.in", "cafe@nes", ["chandan.kumar@saholic.com","manoj.kumar@saholic.com","yukti.jain@saholic.com","ankush.dhingra@saholic.com","manoj.pal@saholic.com"], " Snapdeal Auto Pricing "+runType+" " + str(timestamp), "", [get_attachment_part(filename)], ["rajneesh.arora@saholic.com","rajveer.singh@saholic.com","vikram.raghav@saholic.com","kshitij.sood@saholic.com","chaitnaya.vats@saholic.com","khushal.bhatia@saholic.com"], [])
1104
        EmailAttachmentSender.mail("build@shop2020.in", "cafe@nes", ["chandan.kumar@saholic.com","manoj.kumar@saholic.com","yukti.jain@saholic.com","ankush.dhingra@saholic.com","manoj.pal@saholic.com"], " Snapdeal Auto Pricing "+runType+" " + str(timestamp), "", [get_attachment_part(filename)], ["rajneesh.arora@saholic.com","rajveer.singh@saholic.com","vikram.raghav@saholic.com","kshitij.sood@saholic.com","chaitnaya.vats@saholic.com","khushal.bhatia@saholic.com"], [])
1104
 
-
 
1105
 
-
 
-
 
1105
    except Exception as e:
1106
 
1106
        print e
-
 
1107
        print "Unable to send report"
1107
        
1108
        
1108
def commitExceptionList(exceptionList,timestamp):
1109
def commitExceptionList(exceptionList,timestamp):
1109
    exceptionItems=[]
1110
    exceptionItems=[]
1110
    for item in exceptionList:
1111
    for item in exceptionList:
1111
        mpHistory = MarketPlaceHistory()
1112
        mpHistory = MarketPlaceHistory()
Line 1421... Line 1422...
1421
    msg['From'] = ""
1422
    msg['From'] = ""
1422
    msg['To'] = ",".join(recipients)
1423
    msg['To'] = ",".join(recipients)
1423
    msg.preamble = "Snapdeal Auto Pricing" + ' - ' + str(datetime.now())
1424
    msg.preamble = "Snapdeal Auto Pricing" + ' - ' + str(datetime.now())
1424
    html_msg = MIMEText(message, 'html')
1425
    html_msg = MIMEText(message, 'html')
1425
    msg.attach(html_msg)
1426
    msg.attach(html_msg)
-
 
1427
    try:
1426
    mailServer.login("build@shop2020.in", "cafe@nes")
1428
        mailServer.login("build@shop2020.in", "cafe@nes")
1427
    #mailServer.sendmail("cafe@nes", ['kshitij.sood@saholic.com'], msg.as_string())
1429
        #mailServer.sendmail("cafe@nes", ['kshitij.sood@saholic.com'], msg.as_string())
1428
    mailServer.sendmail("cafe@nes", recipients, msg.as_string())
1430
        mailServer.sendmail("cafe@nes", recipients, msg.as_string())
-
 
1431
    except Exception as e:
-
 
1432
        print e
-
 
1433
        print "Unable to send pricing mail"
1429
 
1434
 
1430
def commitPricing(successfulAutoDecrease,successfulAutoIncrease,timestamp):
1435
def commitPricing(successfulAutoDecrease,successfulAutoIncrease,timestamp):
1431
    catalog_client = CatalogClient().get_client()
1436
    catalog_client = CatalogClient().get_client()
1432
    inventory_client = InventoryClient().get_client()
1437
    inventory_client = InventoryClient().get_client()
1433
    for item in successfulAutoDecrease:
1438
    for item in successfulAutoDecrease:
Line 1568... Line 1573...
1568
    msg['From'] = ""
1573
    msg['From'] = ""
1569
    msg['To'] = ",".join(recipients)
1574
    msg['To'] = ",".join(recipients)
1570
    msg.preamble = "Snapdeal Lost Buy Box" + ' - ' + str(datetime.now())
1575
    msg.preamble = "Snapdeal Lost Buy Box" + ' - ' + str(datetime.now())
1571
    html_msg = MIMEText(message, 'html')
1576
    html_msg = MIMEText(message, 'html')
1572
    msg.attach(html_msg)
1577
    msg.attach(html_msg)
-
 
1578
    try:
1573
    mailServer.login("build@shop2020.in", "cafe@nes")
1579
        mailServer.login("build@shop2020.in", "cafe@nes")
1574
    #mailServer.sendmail("cafe@nes", ['kshitij.sood@saholic.com'], msg.as_string())
1580
        #mailServer.sendmail("cafe@nes", ['kshitij.sood@saholic.com'], msg.as_string())
1575
    mailServer.sendmail("cafe@nes", recipients, msg.as_string())
1581
        mailServer.sendmail("cafe@nes", recipients, msg.as_string())
-
 
1582
    except Exception as e:
-
 
1583
        print e
-
 
1584
        print "Unable to send lost buy bix mail"
1576
    
1585
    
1577
        
1586
        
1578
        
1587
        
1579
def getOtherTp(snapdealDetails,val,spm):
1588
def getOtherTp(snapdealDetails,val,spm):
1580
    if val.parent_category==10011:
1589
    if val.parent_category==10011: