Subversion Repositories SmartDukaan

Rev

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

Rev 23029 Rev 23316
Line 21... Line 21...
21
    SnapdealStockAtEOD, FlipkartStockAtEOD, StockWeightedNlcInfo, \
21
    SnapdealStockAtEOD, FlipkartStockAtEOD, StockWeightedNlcInfo, \
22
    ItemLocationAvailabilityCache
22
    ItemLocationAvailabilityCache
23
from shop2020.thriftpy.model.v1.inventory.ttypes import \
23
from shop2020.thriftpy.model.v1.inventory.ttypes import \
24
    InventoryServiceException, HolidayType, InventoryType, WarehouseType,\
24
    InventoryServiceException, HolidayType, InventoryType, WarehouseType,\
25
    ItemLocationAvailability, ItemPincodeAvailability
25
    ItemLocationAvailability, ItemPincodeAvailability
26
from shop2020.thriftpy.model.v1.order.ttypes import AlertType
26
from shop2020.thriftpy.model.v1.order.ttypes import AlertType, TransactionStatus
27
from shop2020.thriftpy.purchase.ttypes import PurchaseServiceException
27
from shop2020.thriftpy.purchase.ttypes import PurchaseServiceException
28
from shop2020.utils import EmailAttachmentSender
28
from shop2020.utils import EmailAttachmentSender
29
from shop2020.utils.EmailAttachmentSender import mail
29
from shop2020.utils.EmailAttachmentSender import mail
30
from shop2020.utils.Utils import to_py_date, to_java_date
30
from shop2020.utils.Utils import to_py_date, to_java_date
31
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
31
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
Line 36... Line 36...
36
import datetime
36
import datetime
37
import math
37
import math
38
import sys
38
import sys
39
import threading
39
import threading
40
import json
40
import json
41
from shop2020.thriftpy.logistics.ttypes import LocationInfo
41
from shop2020.thriftpy.logistics.ttypes import LocationInfo, PickUpType
42
 
42
 
43
to_addresses = ["khushal.bhatia@shop2020.in", "chaitnaya.vats@shop2020.in", "chandan.kumar@shop2020.in",'manoj.kumar@shop2020.in']
43
to_addresses = ["khushal.bhatia@shop2020.in", "chaitnaya.vats@shop2020.in", "chandan.kumar@shop2020.in",'manoj.kumar@shop2020.in']
44
mail_user = "cnc.center@shop2020.in"
44
mail_user = "cnc.center@shop2020.in"
45
mail_password = "5h0p2o2o"
45
mail_password = "5h0p2o2o"
46
skippedItems = { 175 : [27, 2160, 2175, 2163, 2158, 7128, 26, 2154],
46
skippedItems = { 175 : [27, 2160, 2175, 2163, 2158, 7128, 26, 2154],
Line 1729... Line 1729...
1729
def add_inventory_in_bulk(bulkInventoryList):
1729
def add_inventory_in_bulk(bulkInventoryList):
1730
    for item in bulkInventoryList:
1730
    for item in bulkInventoryList:
1731
        add_inventory(item.item_id, item.warehouse_id, item.inventory, True)
1731
        add_inventory(item.item_id, item.warehouse_id, item.inventory, True)
1732
    
1732
    
1733
        
1733
        
1734
    
-
 
1735
1734
 
-
 
1735
#from shop2020.clients.TransactionClient import TransactionClient
-
 
1736
#from shop2020.thriftpy.model.v1.order.ttypes import OrderType, OrderSource, TransactionStatus
-
 
1737
#from shop2020.thriftpy.logistics.ttypes import LocationInfo, PickUpType
-
 
1738
#tc = TransactionClient().get_client()
-
 
1739
#tc.changeTransactionStatus(1037182, TransactionStatus.COD_IN_PROCESS, 'Cod Payment Awaited', PickUpType.COURIER, OrderType.B2C, OrderSource.WEBSITE)
-
 
1740