| Line 137... |
Line 137... |
| 137 |
all_supc.append(supc)
|
137 |
all_supc.append(supc)
|
| 138 |
all_lines.append(one_line)
|
138 |
all_lines.append(one_line)
|
| 139 |
continue
|
139 |
continue
|
| 140 |
|
140 |
|
| 141 |
category = Category.query.filter_by(id=item.category).one()
|
141 |
category = Category.query.filter_by(id=item.category).one()
|
| 142 |
parent_category = Category.query.filter_by(parent_category_id=category.parent_category_id).first()
|
142 |
parent_category = Category.query.filter_by(id=category.parent_category_id).first()
|
| 143 |
try:
|
143 |
try:
|
| 144 |
snapdeal_item = SnapdealItem.query.filter_by(item_id=item.id).one()
|
144 |
snapdeal_item = SnapdealItem.query.filter_by(item_id=item.id).one()
|
| 145 |
warehouse = iclient.getWarehouse(snapdeal_item.warehouseId)
|
145 |
warehouse = iclient.getWarehouse(snapdeal_item.warehouseId)
|
| 146 |
item_pricing = iclient.getItemPricing(item.id, warehouse.vendor.id)
|
146 |
item_pricing = iclient.getItemPricing(item.id, warehouse.vendor.id)
|
| 147 |
one_line = _SnapdealItemInfo(item.id, item.product_group, parent_category.display_name, item_pricing.nlc, item.brand, item.model_name, item.model_number, item.color, item.weight, category.parent_category_id, item.risky,"")
|
147 |
one_line = _SnapdealItemInfo(item.id, item.product_group, parent_category.display_name, item_pricing.nlc, item.brand, item.model_name, item.model_number, item.color, item.weight, category.parent_category_id, item.risky,"")
|
| Line 176... |
Line 176... |
| 176 |
sheet.write(0, 5, "Problem Type", heading_xf)
|
176 |
sheet.write(0, 5, "Problem Type", heading_xf)
|
| 177 |
|
177 |
|
| 178 |
i=1
|
178 |
i=1
|
| 179 |
for item in items:
|
179 |
for item in items:
|
| 180 |
sheet.write(i, 0, item.item_id)
|
180 |
sheet.write(i, 0, item.item_id)
|
| 181 |
sheet.write(i, 1, item.brand)
|
181 |
sheet.write(i, 1, item.brand)
|
| 182 |
sheet.write(i, 2, item.model_name)
|
182 |
sheet.write(i, 2, item.model_name)
|
| 183 |
sheet.write(i, 3, item.model_number)
|
183 |
sheet.write(i, 3, item.model_number)
|
| 184 |
sheet.write(i, 4, item.color)
|
184 |
sheet.write(i, 4, item.color)
|
| 185 |
if len(item.issue)!=0:
|
185 |
if len(item.issue)!=0:
|
| 186 |
sheet.write(i, 5, "Wrong item id or wrong warehouse Id")
|
186 |
sheet.write(i, 5, "Wrong item id or wrong warehouse Id")
|
| 187 |
else:
|
187 |
else:
|
| 188 |
sheet.write(i, 5, "Unable to fetch info from snapdeal server")
|
188 |
sheet.write(i, 5, "Unable to fetch info from snapdeal server")
|
| 189 |
i+=1
|
189 |
i+=1
|