Subversion Repositories SmartDukaan

Rev

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

Rev 6241 Rev 6511
Line 1... Line 1...
1
'''
1
'''
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, Category, \
7
    Category, SourceItemPricing, Source, ItemType, \
7
    SourceItemPricing, Source, ItemType, \
8
    ProductNotificationRequest as TProductNotificationRequest, \
8
    ProductNotificationRequest as TProductNotificationRequest, \
9
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
9
    ProductNotificationRequestCount as TProductNotificationRequestCount, \
10
    VoucherItemMapping
10
    VoucherItemMapping, EntityTag as TEntityTag
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(item):
13
def to_t_item(item):
14
    t_item = Item()
14
    t_item = Item()
15
    if item is None:
15
    if item is None:
Line 111... Line 111...
111
    if product_notification_request_count:
111
    if product_notification_request_count:
112
        item, count = product_notification_request_count
112
        item, count = product_notification_request_count
113
        t_product_notification_request_count.item = to_t_item(item)
113
        t_product_notification_request_count.item = to_t_item(item)
114
        t_product_notification_request_count.count = count
114
        t_product_notification_request_count.count = count
115
    
115
    
116
    return t_product_notification_request_count
-
 
117
116
    return t_product_notification_request_count
-
 
117
 
-
 
118
def to_t_entity_tag(entity_tag):
-
 
119
    t_entity_tag = TEntityTag()
-
 
120
    t_entity_tag.entityId = entity_tag.entityId
-
 
121
    t_entity_tag.tag = entity_tag.tag
-
 
122
118
123