Subversion Repositories SmartDukaan

Rev

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

Rev 1910 Rev 1970
Line 2... Line 2...
2
Created on 23-Mar-2010
2
Created on 23-Mar-2010
3
 
3
 
4
@author: ashish
4
@author: ashish
5
'''
5
'''
6
from shop2020.thriftpy.model.v1.catalog.ttypes import  Item,\
6
from shop2020.thriftpy.model.v1.catalog.ttypes import  Item,\
7
    ItemInventory, Warehouse, VendorItemPricing, Vendor
7
    ItemInventory, Warehouse, VendorItemPricing, Vendor, Category
8
import time
8
import time
9
from shop2020.utils.Utils import to_java_date
9
from shop2020.utils.Utils import to_java_date
10
 
10
 
11
def to_t_item(item):
11
def to_t_item(item):
12
    t_item = Item()
12
    t_item = Item()
Line 96... Line 96...
96
    t_vendor_item_pricing.vendorId = vendor_item_pricing.vendor.id
96
    t_vendor_item_pricing.vendorId = vendor_item_pricing.vendor.id
97
    t_vendor_item_pricing.itemId = vendor_item_pricing.item.id
97
    t_vendor_item_pricing.itemId = vendor_item_pricing.item.id
98
    t_vendor_item_pricing.transferPrice = vendor_item_pricing.transfer_price
98
    t_vendor_item_pricing.transferPrice = vendor_item_pricing.transfer_price
99
    t_vendor_item_pricing.dealerPrice = vendor_item_pricing.dealerPrice
99
    t_vendor_item_pricing.dealerPrice = vendor_item_pricing.dealerPrice
100
    t_vendor_item_pricing.mop = vendor_item_pricing.mop
100
    t_vendor_item_pricing.mop = vendor_item_pricing.mop
101
    return t_vendor_item_pricing
-
 
102
101
    return t_vendor_item_pricing
-
 
102
 
-
 
103
def to_t_category(category):
-
 
104
    t_category = Category()
-
 
105
    t_category.id = category.id
-
 
106
    t_category.label = category.label
-
 
107
    t_category.description = category.description
-
 
108
    t_category.parent_category_id = category.parent_category_id
-
 
109
    return t_category
-
 
110
103
111