| Line 16... |
Line 16... |
| 16 |
Category, EntityIDGenerator, VendorItemPricing, VendorItemMapping, Vendor, \
|
16 |
Category, EntityIDGenerator, VendorItemPricing, VendorItemMapping, Vendor, \
|
| 17 |
SimilarItems, ProductNotification, Source, SourceItemPricing, AuthorizationLog, \
|
17 |
SimilarItems, ProductNotification, Source, SourceItemPricing, AuthorizationLog, \
|
| 18 |
MissedInventoryUpdate, BadInventorySnapshot, VendorItemProcurementDelay, \
|
18 |
MissedInventoryUpdate, BadInventorySnapshot, VendorItemProcurementDelay, \
|
| 19 |
VendorHolidays, ItemAvailabilityCache
|
19 |
VendorHolidays, ItemAvailabilityCache
|
| 20 |
from shop2020.thriftpy.model.v1.catalog.ttypes import InventoryServiceException, \
|
20 |
from shop2020.thriftpy.model.v1.catalog.ttypes import InventoryServiceException, \
|
| 21 |
status, ItemShippingInfo, HolidayType, InventoryType
|
21 |
status, ItemShippingInfo, HolidayType, InventoryType, ItemType
|
| 22 |
from shop2020.thriftpy.model.v1.order.ttypes import AlertType
|
22 |
from shop2020.thriftpy.model.v1.order.ttypes import AlertType
|
| 23 |
from shop2020.utils import EmailAttachmentSender
|
23 |
from shop2020.utils import EmailAttachmentSender
|
| 24 |
from shop2020.utils.EmailAttachmentSender import mail
|
24 |
from shop2020.utils.EmailAttachmentSender import mail
|
| 25 |
from shop2020.utils.Utils import to_py_date, log_risky_flag
|
25 |
from shop2020.utils.Utils import to_py_date, log_risky_flag
|
| 26 |
from sqlalchemy import desc, asc
|
26 |
from sqlalchemy import desc, asc
|
| Line 227... |
Line 227... |
| 227 |
if ds_item.risky != item.risky:
|
227 |
if ds_item.risky != item.risky:
|
| 228 |
message += "Risky flag is changed to '{0}'.\n".format(set)
|
228 |
message += "Risky flag is changed to '{0}'.\n".format(set)
|
| 229 |
|
229 |
|
| 230 |
ds_item.risky = item.risky
|
230 |
ds_item.risky = item.risky
|
| 231 |
|
231 |
|
| - |
|
232 |
ds_item.type = ItemType._VALUES_TO_NAMES[item.type]
|
| - |
|
233 |
ds_item.hasItemNo = item.hasItemNo
|
| - |
|
234 |
|
| 232 |
if item.expectedDelay is not None:
|
235 |
if item.expectedDelay is not None:
|
| 233 |
ds_item.expectedDelay = item.expectedDelay
|
236 |
ds_item.expectedDelay = item.expectedDelay
|
| 234 |
|
237 |
|
| 235 |
if item.preferredWarehouse:
|
238 |
if item.preferredWarehouse:
|
| 236 |
if item.preferredWarehouse != ds_item.preferredWarehouse:
|
239 |
if item.preferredWarehouse != ds_item.preferredWarehouse:
|
| Line 323... |
Line 326... |
| 323 |
if item.bestSellingRank:
|
326 |
if item.bestSellingRank:
|
| 324 |
ds_item.bestSellingRank = item.bestSellingRank
|
327 |
ds_item.bestSellingRank = item.bestSellingRank
|
| 325 |
ds_item.defaultForEntity = item.defaultForEntity
|
328 |
ds_item.defaultForEntity = item.defaultForEntity
|
| 326 |
ds_item.risky = item.risky
|
329 |
ds_item.risky = item.risky
|
| 327 |
|
330 |
|
| - |
|
331 |
ds_item.type = ItemType._VALUES_TO_NAMES[item.type]
|
| - |
|
332 |
ds_item.hasItemNo = item.hasItemNo
|
| - |
|
333 |
|
| 328 |
if item.expectedDelay is not None:
|
334 |
if item.expectedDelay is not None:
|
| 329 |
ds_item.expectedDelay = item.expectedDelay
|
335 |
ds_item.expectedDelay = item.expectedDelay
|
| 330 |
else:
|
336 |
else:
|
| 331 |
ds_item.expectedDelay = 0
|
337 |
ds_item.expectedDelay = 0
|
| 332 |
|
338 |
|