| Line 125... |
Line 125... |
| 125 |
negativeItems.append(item_id)
|
125 |
negativeItems.append(item_id)
|
| 126 |
except:
|
126 |
except:
|
| 127 |
raise InventoryServiceException(108, "Some unforeseen error while updating inventory")
|
127 |
raise InventoryServiceException(108, "Some unforeseen error while updating inventory")
|
| 128 |
return negativeItems
|
128 |
return negativeItems
|
| 129 |
|
129 |
|
| 130 |
def get_ignored_warehouses(item_id):
|
130 |
def get_ignored_warehouses(item_id):
|
| 131 |
Ignored_inventory_items = IgnoredInventoryUpdateItems.query.filter_by(item_id=item_id).all()
|
- |
|
| 132 |
warehouses = []
|
131 |
warehouses = []
|
| - |
|
132 |
#No item availability cache for Hotspot Specific Store
|
| - |
|
133 |
#No virtual is allowed
|
| - |
|
134 |
hotspotPhysicalWarehouses = [7678, 7681]
|
| - |
|
135 |
hotspotVendorWarehouses = Warehouse.query.filter(Warehouse.billingWarehouseId.in_(hotspotPhysicalWarehouses)).filter(Warehouse.inventoryType=='GOOD').all()
|
| - |
|
136 |
for warehouse in hotspotVendorWarehouses:
|
| - |
|
137 |
warehouses.append(warehouse.id)
|
| - |
|
138 |
Ignored_inventory_items = IgnoredInventoryUpdateItems.query.filter_by(item_id=item_id).all()
|
| 133 |
for Ignored_inventory_item in Ignored_inventory_items:
|
139 |
for Ignored_inventory_item in Ignored_inventory_items:
|
| 134 |
warehouses.append(Ignored_inventory_item.warehouse_id)
|
140 |
warehouses.append(Ignored_inventory_item.warehouse_id)
|
| 135 |
return warehouses
|
141 |
return warehouses
|
| 136 |
|
142 |
|
| 137 |
def update_inventory_history(warehouse_id, timestamp, availability):
|
143 |
def update_inventory_history(warehouse_id, timestamp, availability):
|