Subversion Repositories SmartDukaan

Rev

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

Rev 8220 Rev 8282
Line 5... Line 5...
5
'''
5
'''
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
10
    WarehouseLocation,AmazonFbaInventorySnapshot as TAmazonFbaInventorySnapshot
11
from shop2020.utils.Utils import to_java_date
11
from shop2020.utils.Utils import to_java_date
12
 
12
 
13
def to_t_item_inventory(item_inventory_list, item_id):
13
def to_t_item_inventory(item_inventory_list, item_id):
14
    t_item_inventory = ItemInventory()
14
    t_item_inventory = ItemInventory()
15
    t_item_inventory.id = item_id
15
    t_item_inventory.id = item_id
Line 98... Line 98...
98
def to_t_amazon_inventory_snapshot(AmazonInventorySnapshot):
98
def to_t_amazon_inventory_snapshot(AmazonInventorySnapshot):
99
    t_amazon_inventory_snapshot = TAmazonInventorySnapshot()
99
    t_amazon_inventory_snapshot = TAmazonInventorySnapshot()
100
    t_amazon_inventory_snapshot.item_id = AmazonInventorySnapshot.item_id
100
    t_amazon_inventory_snapshot.item_id = AmazonInventorySnapshot.item_id
101
    t_amazon_inventory_snapshot.availability = AmazonInventorySnapshot.availability
101
    t_amazon_inventory_snapshot.availability = AmazonInventorySnapshot.availability
102
    t_amazon_inventory_snapshot.reserved = AmazonInventorySnapshot.reserved
102
    t_amazon_inventory_snapshot.reserved = AmazonInventorySnapshot.reserved
-
 
103
    return t_amazon_inventory_snapshot
-
 
104
 
-
 
105
def to_t_amazon_fba_inventory_snapshot(AmazonFbaInventorySnapshot):
-
 
106
    t_amazon_inventory_snapshot = TAmazonFbaInventorySnapshot()
-
 
107
    t_amazon_inventory_snapshot.item_id = AmazonFbaInventorySnapshot.item_id
-
 
108
    t_amazon_inventory_snapshot.availability = AmazonFbaInventorySnapshot.availability
103
    return t_amazon_inventory_snapshot
109
    return t_amazon_inventory_snapshot
104
110