| Line 30... |
Line 30... |
| 30 |
mark_orders_as_po_raised, mark_orders_as_reversal_initiated,\
|
30 |
mark_orders_as_po_raised, mark_orders_as_reversal_initiated,\
|
| 31 |
mark_orders_as_not_available, update_shipment_address,\
|
31 |
mark_orders_as_not_available, update_shipment_address,\
|
| 32 |
mark_orders_as_timeout, get_order_for_awb,\
|
32 |
mark_orders_as_timeout, get_order_for_awb,\
|
| 33 |
mark_orders_as_shipped_from_warehouse, mark_alerts_as_seen, \
|
33 |
mark_orders_as_shipped_from_warehouse, mark_alerts_as_seen, \
|
| 34 |
mark_order_doa_request_received, mark_order_doa_request_authorized,\
|
34 |
mark_order_doa_request_received, mark_order_doa_request_authorized,\
|
| 35 |
mark_order_return_request_received, mark_order_return_request_authorized
|
35 |
mark_order_return_request_received, mark_order_return_request_authorized,\
|
| - |
|
36 |
validate_return_product
|
| 36 |
|
37 |
|
| 37 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
38 |
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
|
| 38 |
to_t_alert, to_t_order, to_t_lineitem
|
39 |
to_t_alert, to_t_order, to_t_lineitem
|
| 39 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
40 |
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
|
| 40 |
LineItem, Order, TransactionServiceException
|
41 |
LineItem, Order, TransactionServiceException
|
| Line 737... |
Line 738... |
| 737 |
try:
|
738 |
try:
|
| 738 |
return validate_doa(orderId, isValid)
|
739 |
return validate_doa(orderId, isValid)
|
| 739 |
finally:
|
740 |
finally:
|
| 740 |
close_session()
|
741 |
close_session()
|
| 741 |
|
742 |
|
| - |
|
743 |
def validateReturnProduct(self, orderId, isUsable):
|
| - |
|
744 |
"""
|
| - |
|
745 |
Parameters:
|
| - |
|
746 |
- orderId
|
| - |
|
747 |
- isUsable
|
| - |
|
748 |
"""
|
| - |
|
749 |
try:
|
| - |
|
750 |
return validate_return_product(orderId, isUsable)
|
| - |
|
751 |
finally:
|
| - |
|
752 |
close_session()
|
| - |
|
753 |
|
| 742 |
def reshipOrder(self, orderId):
|
754 |
def reshipOrder(self, orderId):
|
| 743 |
"""
|
755 |
"""
|
| 744 |
If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
|
756 |
If the order is in RTO_RECEIVED_PRESTINE or DOA_CERT_INVALID state, it does the following:
|
| 745 |
1. Creates a new order for processing in the BILLED state. All billing information is saved.
|
757 |
1. Creates a new order for processing in the BILLED state. All billing information is saved.
|
| 746 |
2. Marks the current order as one of the final states RTO_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
|
758 |
2. Marks the current order as one of the final states RTO_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
|