| Line 3... |
Line 3... |
| 3 |
|
3 |
|
| 4 |
@author: ashish
|
4 |
@author: ashish
|
| 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
|
| 9 |
from shop2020.utils.Utils import to_java_date
|
10 |
from shop2020.utils.Utils import to_java_date
|
| 10 |
|
11 |
|
| 11 |
def to_t_item_inventory(item_inventory_list, item_id):
|
12 |
def to_t_item_inventory(item_inventory_list, item_id):
|
| 12 |
t_item_inventory = ItemInventory()
|
13 |
t_item_inventory = ItemInventory()
|
| 13 |
t_item_inventory.id = item_id
|
14 |
t_item_inventory.id = item_id
|
| Line 69... |
Line 70... |
| 69 |
def to_t_vendor_item_mapping(vendor_item_mapping):
|
70 |
def to_t_vendor_item_mapping(vendor_item_mapping):
|
| 70 |
t_vendor_item_mapping = VendorItemMapping()
|
71 |
t_vendor_item_mapping = VendorItemMapping()
|
| 71 |
t_vendor_item_mapping.vendorId = vendor_item_mapping.vendor.id
|
72 |
t_vendor_item_mapping.vendorId = vendor_item_mapping.vendor.id
|
| 72 |
t_vendor_item_mapping.itemId = vendor_item_mapping.item_id
|
73 |
t_vendor_item_mapping.itemId = vendor_item_mapping.item_id
|
| 73 |
t_vendor_item_mapping.itemKey = vendor_item_mapping.item_key
|
74 |
t_vendor_item_mapping.itemKey = vendor_item_mapping.item_key
|
| 74 |
return t_vendor_item_mapping
|
- |
|
| 75 |
|
75 |
return t_vendor_item_mapping
|
| - |
|
76 |
|
| - |
|
77 |
def to_t_item_stock_purchase_params(item_stock_purchase_params):
|
| - |
|
78 |
t_item_stock_purchase_params = ItemStockPurchaseParams()
|
| - |
|
79 |
t_item_stock_purchase_params.item_id = item_stock_purchase_params.item_id
|
| - |
|
80 |
t_item_stock_purchase_params.numOfDaysStock = item_stock_purchase_params.numOfDaysStock
|
| - |
|
81 |
t_item_stock_purchase_params.minStockLevel = item_stock_purchase_params.minStockLevel
|
| - |
|
82 |
return t_item_stock_purchase_params
|
| - |
|
83 |
|
| 76 |
|
84 |
|