Subversion Repositories SmartDukaan

Rev

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

Rev 5460 Rev 5504
Line 6... Line 6...
6
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, ItemInventory, \
6
from shop2020.thriftpy.model.v1.catalog.ttypes import Item, ItemInventory, \
7
    Warehouse, VendorItemPricing, Vendor, Category, VendorItemMapping, \
7
    Warehouse, VendorItemPricing, Vendor, Category, VendorItemMapping, \
8
    SourceItemPricing, Source, ItemType, \
8
    SourceItemPricing, Source, ItemType, \
9
    ProductNotificationRequest as TProductNotificationRequest, \
9
    ProductNotificationRequest as TProductNotificationRequest, \
10
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
10
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
11
    InventoryType, WarehouseType
11
    InventoryType, WarehouseType, VoucherItemMapping
12
from shop2020.utils.Utils import to_java_date
12
from shop2020.utils.Utils import to_java_date
13
import time
13
import time
14
 
14
 
15
def to_t_item(item):
15
def to_t_item(item):
16
    t_item = Item()
16
    t_item = Item()
Line 119... Line 119...
119
    t_vendor_item_mapping = VendorItemMapping()
119
    t_vendor_item_mapping = VendorItemMapping()
120
    t_vendor_item_mapping.vendorId = vendor_item_mapping.vendor.id
120
    t_vendor_item_mapping.vendorId = vendor_item_mapping.vendor.id
121
    t_vendor_item_mapping.itemId = vendor_item_mapping.item.id
121
    t_vendor_item_mapping.itemId = vendor_item_mapping.item.id
122
    t_vendor_item_mapping.itemKey = vendor_item_mapping.item_key
122
    t_vendor_item_mapping.itemKey = vendor_item_mapping.item_key
123
    return t_vendor_item_mapping
123
    return t_vendor_item_mapping
124
    
124
 
-
 
125
def to_t_voucher_item_mapping(voucher):
-
 
126
    t_voucher = VoucherItemMapping()
-
 
127
    t_voucher.voucherType = voucher.voucherType
-
 
128
    t_voucher.itemId = voucher.item.id
-
 
129
    t_voucher.amount = voucher.amount
-
 
130
    return t_voucher
125
 
131
 
126
def to_t_category(category):
132
def to_t_category(category):
127
    t_category = Category()
133
    t_category = Category()
128
    t_category.id = category.id
134
    t_category.id = category.id
129
    t_category.label = category.label
135
    t_category.label = category.label