| Line 26... |
Line 26... |
| 26 |
delete_item_from_ignore_inventory_update_list,get_all_ignored_inventoryupdate_items_count, \
|
26 |
delete_item_from_ignore_inventory_update_list,get_all_ignored_inventoryupdate_items_count, \
|
| 27 |
get_ignored_inventoryupdate_itemids, update_item_stock_purchase_params, \
|
27 |
get_ignored_inventoryupdate_itemids, update_item_stock_purchase_params, \
|
| 28 |
get_item_stock_purchase_params, add_oos_status_for_item, \
|
28 |
get_item_stock_purchase_params, add_oos_status_for_item, \
|
| 29 |
get_oos_statuses_for_x_days_for_item, get_non_zero_item_stock_purchase_params, \
|
29 |
get_oos_statuses_for_x_days_for_item, get_non_zero_item_stock_purchase_params, \
|
| 30 |
get_billable_inventory_and_pending_orders,get_warehouse_name,get_amazon_inventory_for_item,get_all_amazon_inventory, \
|
30 |
get_billable_inventory_and_pending_orders,get_warehouse_name,get_amazon_inventory_for_item,get_all_amazon_inventory, \
|
| 31 |
add_or_update_amazon_inventory_for_item
|
31 |
add_or_update_amazon_inventory_for_item, update_reservation_for_order
|
| 32 |
from shop2020.model.v1.inventory.impl.DataService import Warehouse, \
|
32 |
from shop2020.model.v1.inventory.impl.DataService import Warehouse, \
|
| 33 |
MissedInventoryUpdate, VendorItemMapping
|
33 |
MissedInventoryUpdate, VendorItemMapping
|
| 34 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
34 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
| 35 |
InventoryServiceException, WarehouseType, InventoryType, \
|
35 |
InventoryServiceException, WarehouseType, InventoryType, \
|
| 36 |
AvailableAndReservedStock
|
36 |
AvailableAndReservedStock
|
| Line 257... |
Line 257... |
| 257 |
log_entry(self, "reserveItemInWarehouse called")
|
257 |
log_entry(self, "reserveItemInWarehouse called")
|
| 258 |
try:
|
258 |
try:
|
| 259 |
return reserve_item_in_warehouse(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity)
|
259 |
return reserve_item_in_warehouse(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity)
|
| 260 |
finally:
|
260 |
finally:
|
| 261 |
close_session()
|
261 |
close_session()
|
| - |
|
262 |
|
| - |
|
263 |
|
| - |
|
264 |
def updateReservationForOrder(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
|
| - |
|
265 |
"""
|
| - |
|
266 |
Increases the reservation count for an item in a warehouse. Should always succeed normally.
|
| - |
|
267 |
|
| - |
|
268 |
Parameters:
|
| - |
|
269 |
- itemId
|
| - |
|
270 |
- warehouseId
|
| - |
|
271 |
"""
|
| - |
|
272 |
log_entry(self, "reserveItemInWarehouse called")
|
| - |
|
273 |
try:
|
| - |
|
274 |
return update_reservation_for_order(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity)
|
| - |
|
275 |
finally:
|
| - |
|
276 |
close_session()
|
| 262 |
|
277 |
|
| 263 |
def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
|
278 |
def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
|
| 264 |
"""
|
279 |
"""
|
| 265 |
Decreases the reservation count for an item in a warehouse. Should always succeed normally.
|
280 |
Decreases the reservation count for an item in a warehouse. Should always succeed normally.
|
| 266 |
|
281 |
|