Subversion Repositories SmartDukaan

Rev

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

Rev 5217 Rev 5305
Line 29... Line 29...
29
    t_item.featureDescription = item.feature_description
29
    t_item.featureDescription = item.feature_description
30
    if item.startDate:
30
    if item.startDate:
31
        t_item.startDate = to_java_date(item.startDate)
31
        t_item.startDate = to_java_date(item.startDate)
32
    if item.comingSoonStartDate:
32
    if item.comingSoonStartDate:
33
        t_item.comingSoonStartDate = to_java_date(item.comingSoonStartDate)
33
        t_item.comingSoonStartDate = to_java_date(item.comingSoonStartDate)
34
        
-
 
35
    print "Convertors  : t_item.comingSoonStartDate" + `t_item.comingSoonStartDate`
-
 
36
 
-
 
37
    if item.expectedArrivalDate:
34
    if item.expectedArrivalDate:
38
        t_item.expectedArrivalDate = to_java_date(item.expectedArrivalDate)
35
        t_item.expectedArrivalDate = to_java_date(item.expectedArrivalDate)
39
    print "Convertors  : t_item.expectedArrivalDate" + `t_item.expectedArrivalDate`
-
 
40
    if item.addedOn:
36
    if item.addedOn:
41
        t_item.addedOn = to_java_date(item.addedOn)
37
        t_item.addedOn = to_java_date(item.addedOn)
42
    if item.updatedOn:
38
    if item.updatedOn:
43
        t_item.updatedOn = to_java_date(item.updatedOn)
39
        t_item.updatedOn = to_java_date(item.updatedOn)
44
    t_item.itemStatus = item.status
40
    t_item.itemStatus = item.status
45
    t_item.status_description = item.status_description
41
    t_item.status_description = item.status_description
46
    
-
 
47
    if item.sellingPrice:
42
    if item.sellingPrice:
48
        t_item.sellingPrice = item.sellingPrice
43
        t_item.sellingPrice = item.sellingPrice
49
    if item.mrp:
44
    if item.mrp:
50
        t_item.mrp = item.mrp    
45
        t_item.mrp = item.mrp    
51
    t_item.itemInventory = to_t_item_inventory(item.currentInventory, item.id)
-
 
52
    
46
    
53
    if item.comments:
47
    if item.comments:
54
        t_item.comments = item.comments
48
        t_item.comments = item.comments
55
    if item.bestDealText:
49
    if item.bestDealText:
56
        t_item.bestDealText = item.bestDealText
50
        t_item.bestDealText = item.bestDealText
57
    if item.bestDealValue:
51
    if item.bestDealValue:
58
        t_item.bestDealValue = item.bestDealValue
52
        t_item.bestDealValue = item.bestDealValue
59
    
53
    
60
    t_item.defaultForEntity = item.defaultForEntity
54
    t_item.defaultForEntity = item.defaultForEntity
61
    t_item.otherInfo = to_t_other_info(item)
-
 
62
    t_item.bestSellingRank = item.bestSellingRank
55
    t_item.bestSellingRank = item.bestSellingRank
63
    t_item.risky = item.risky
56
    t_item.risky = item.risky
64
    t_item.expectedDelay = item.expectedDelay
57
    t_item.expectedDelay = item.expectedDelay
65
    if item.preferredWarehouse:
58
    if item.preferredWarehouse:
66
        t_item.preferredWarehouse = int(item.preferredWarehouse)
59
        t_item.preferredWarehouse = int(item.preferredWarehouse)
Line 71... Line 64...
71
    t_item.preferredVendor = item.preferredVendor
64
    t_item.preferredVendor = item.preferredVendor
72
    t_item.type = ItemType._NAMES_TO_VALUES[item.type]
65
    t_item.type = ItemType._NAMES_TO_VALUES[item.type]
73
    
66
    
74
    return t_item
67
    return t_item
75
 
68
 
76
def to_t_other_info(item):
-
 
77
    t_other_info = {}
-
 
78
    for item_info in item.iteminfo:
-
 
79
        t_other_info[item_info.key] = item_info.value
-
 
80
    
-
 
81
def to_t_item_inventory(item_inventory_list, item_id):
69
def to_t_item_inventory(item_inventory_list, item_id):
82
    t_item_inventory = ItemInventory()
70
    t_item_inventory = ItemInventory()
83
    t_item_inventory.id = item_id
71
    t_item_inventory.id = item_id
84
    t_item_inventory.availability = {}
72
    t_item_inventory.availability = {}
85
    t_item_inventory.reserved = {}
73
    t_item_inventory.reserved = {}