Subversion Repositories SmartDukaan

Rev

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

Rev 917 Rev 963
Line 250... Line 250...
250
        
250
        
251
def create_line_item(item_id):
251
def create_line_item(item_id):
252
    inventory_client = InventoryClient().get_client()
252
    inventory_client = InventoryClient().get_client()
253
    item = inventory_client.getItem(item_id)
253
    item = inventory_client.getItem(item_id)
254
    t_line_item = TLineItem()
254
    t_line_item = TLineItem()
-
 
255
    t_line_item.productGroup = item.productGroup
255
    t_line_item.model_name = item.modelName
256
    t_line_item.brand = item.brand
256
    t_line_item.model_number = item.modelNumber
257
    t_line_item.model_number = item.modelNumber
257
    if item.color is None or item.color == "NA":
258
    if item.color is None or item.color == "NA":
258
        t_line_item.color = ""
259
        t_line_item.color = ""
259
    else:
260
    else:
260
        t_line_item.color = item.color
261
        t_line_item.color = item.color
-
 
262
    t_line_item.model_name = item.modelName
261
    t_line_item.extra_info = item.featureDescription
263
    t_line_item.extra_info = item.featureDescription
262
    t_line_item.brand = item.manufacturerName
-
 
263
    t_line_item.item_id = item.id
264
    t_line_item.item_id = item.id
264
    t_line_item.quantity = 1
265
    t_line_item.quantity = 1
265
    t_line_item.unit_price = item.sellingPrice
266
    t_line_item.unit_price = item.sellingPrice
266
    t_line_item.unit_weight = item.weight
267
    t_line_item.unit_weight = item.weight
267
    t_line_item.total_price = item.sellingPrice
268
    t_line_item.total_price = item.sellingPrice