| Line 4874... |
Line 4874... |
| 4874 |
inventoryClient = InventoryClient().get_client()
|
4874 |
inventoryClient = InventoryClient().get_client()
|
| 4875 |
fulFilmentWarehouse = inventoryClient.getWarehouse(order.fulfilmentWarehouseId)
|
4875 |
fulFilmentWarehouse = inventoryClient.getWarehouse(order.fulfilmentWarehouseId)
|
| 4876 |
|
4876 |
|
| 4877 |
for warehouseId, availability in itemInventory.availability.iteritems():
|
4877 |
for warehouseId, availability in itemInventory.availability.iteritems():
|
| 4878 |
warehouse = warehouses.get(warehouseId)
|
4878 |
warehouse = warehouses.get(warehouseId)
|
| 4879 |
if warehouse.warehouseType==WarehouseType.THIRD_PARTY:
|
4879 |
if warehouse is None:
|
| 4880 |
continue
|
4880 |
continue
|
| 4881 |
if availability - itemInventory.reserved[warehouseId] >= order.quantity and warehouse.stateId==fulFilmentWarehouse.stateId:
|
4881 |
if availability - itemInventory.reserved[warehouseId] >= order.quantity and warehouse.stateId==fulFilmentWarehouse.stateId:
|
| 4882 |
try:
|
4882 |
try:
|
| 4883 |
print "++++" + str(order.id) + "=" + str(order.fulfilmentWarehouseId) + "->"+ str(warehouseId)
|
4883 |
print "++++" + str(order.id) + "=" + str(order.fulfilmentWarehouseId) + "->"+ str(warehouseId)
|
| 4884 |
change_warehouse(order.id, warehouseId)
|
4884 |
change_warehouse(order.id, warehouseId)
|