| Line 6... |
Line 6... |
| 6 |
from shop2020.thriftpy.model.v1.inventory.ttypes import ItemInventory, \
|
6 |
from shop2020.thriftpy.model.v1.inventory.ttypes import ItemInventory, \
|
| 7 |
Warehouse, VendorItemPricing, Vendor, VendorItemMapping, \
|
7 |
Warehouse, VendorItemPricing, Vendor, VendorItemMapping, \
|
| 8 |
InventoryType, WarehouseType, IgnoredInventoryUpdateItems as TIgnoredinventoryupdateitems ,\
|
8 |
InventoryType, WarehouseType, IgnoredInventoryUpdateItems as TIgnoredinventoryupdateitems ,\
|
| 9 |
ItemStockPurchaseParams, OOSStatus, AmazonInventorySnapshot as TAmazonInventorySnapshot,\
|
9 |
ItemStockPurchaseParams, OOSStatus, AmazonInventorySnapshot as TAmazonInventorySnapshot,\
|
| 10 |
WarehouseLocation,AmazonFbaInventorySnapshot as TAmazonFbaInventorySnapshot,\
|
10 |
WarehouseLocation,AmazonFbaInventorySnapshot as TAmazonFbaInventorySnapshot,\
|
| 11 |
SnapdealInventoryItem as TSnapdealInventoryItem, HoldInventoryDetail as THoldInventoryDetail
|
11 |
SnapdealInventoryItem as TSnapdealInventoryItem, HoldInventoryDetail as THoldInventoryDetail, \
|
| - |
|
12 |
FlipkartInventorySnapshot as TFlipkartInventorySnapshot
|
| 12 |
from shop2020.utils.Utils import to_java_date
|
13 |
from shop2020.utils.Utils import to_java_date
|
| 13 |
|
14 |
|
| 14 |
def to_t_item_inventory(item_inventory_list, item_id):
|
15 |
def to_t_item_inventory(item_inventory_list, item_id):
|
| 15 |
t_item_inventory = ItemInventory()
|
16 |
t_item_inventory = ItemInventory()
|
| 16 |
t_item_inventory.id = item_id
|
17 |
t_item_inventory.id = item_id
|
| Line 125... |
Line 126... |
| 125 |
t_hold_inventory_detail.item_id = holdInventoryDetail.item_id
|
126 |
t_hold_inventory_detail.item_id = holdInventoryDetail.item_id
|
| 126 |
t_hold_inventory_detail.warehouse_id = holdInventoryDetail.warehouse_id
|
127 |
t_hold_inventory_detail.warehouse_id = holdInventoryDetail.warehouse_id
|
| 127 |
t_hold_inventory_detail.source = holdInventoryDetail.source
|
128 |
t_hold_inventory_detail.source = holdInventoryDetail.source
|
| 128 |
t_hold_inventory_detail.held = holdInventoryDetail.held
|
129 |
t_hold_inventory_detail.held = holdInventoryDetail.held
|
| 129 |
return t_hold_inventory_detail
|
130 |
return t_hold_inventory_detail
|
| - |
|
131 |
|
| - |
|
132 |
def to_t_flipkart_inventory_snapshot(flipkartInventoryItem):
|
| - |
|
133 |
t_flipkart_inventory_snapshot = TFlipkartInventorySnapshot()
|
| - |
|
134 |
if flipkartInventoryItem is None:
|
| - |
|
135 |
return t_flipkart_inventory_snapshot
|
| - |
|
136 |
t_flipkart_inventory_snapshot.item_id = flipkartInventoryItem.item_id
|
| - |
|
137 |
t_flipkart_inventory_snapshot.availability = flipkartInventoryItem.availability
|
| - |
|
138 |
t_flipkart_inventory_snapshot.heldOrders = flipkartInventoryItem.heldOrders
|
| - |
|
139 |
t_flipkart_inventory_snapshot.createdOrders = flipkartInventoryItem.createdOrders
|
| - |
|
140 |
return t_flipkart_inventory_snapshot
|
| 130 |
|
141 |
|
| 131 |
|
142 |
|