Subversion Repositories SmartDukaan

Rev

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

Rev 4394 Rev 4410
Line 27... Line 27...
27
    mark_order_cancellation_request_denied, refund_transaction,\
27
    mark_order_cancellation_request_denied, refund_transaction,\
28
    mark_order_cancellation_request_confirmed,\
28
    mark_order_cancellation_request_confirmed,\
29
    mark_transaction_as_payment_flag_removed, accept_orders_for_item_id,\
29
    mark_transaction_as_payment_flag_removed, accept_orders_for_item_id,\
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
33
 
34
 
34
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
35
from shop2020.model.v1.order.impl.Convertors import to_t_transaction,\
35
    to_t_alert, to_t_order, to_t_lineitem
36
    to_t_alert, to_t_order, to_t_lineitem
36
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
37
from shop2020.thriftpy.model.v1.order.ttypes import Transaction, OrderStatus,\
37
    LineItem, Order, TransactionServiceException
38
    LineItem, Order, TransactionServiceException
Line 390... Line 391...
390
            close_session()
391
            close_session()
391
    
392
    
392
    def markOrdersAsManifested(self, warehouseId, providerId, cod):
393
    def markOrdersAsManifested(self, warehouseId, providerId, cod):
393
        """
394
        """
394
        Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
395
        Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
395
        given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
396
        given warehouse and were picked up by the given provider as MANIFESTED.
396
        
397
        
397
        Parameters:
398
        Parameters:
398
         - warehouseId
399
         - warehouseId
399
         - providerId
400
         - providerId
400
         - cod
401
         - cod
Line 402... Line 403...
402
        try:
403
        try:
403
            return mark_orders_as_manifested(warehouseId, providerId, cod)
404
            return mark_orders_as_manifested(warehouseId, providerId, cod)
404
        finally:
405
        finally:
405
            close_session()
406
            close_session()
406
 
407
 
-
 
408
    def markOrdersAsShippedFromWarehouse(self, warehouseId, providerId, cod):
-
 
409
        """
-
 
410
        Depending on the third parameter, marks either all prepaid or all cod orders MANIFESTED by the
-
 
411
        given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
-
 
412
        
-
 
413
        Parameters:
-
 
414
         - warehouseId
-
 
415
         - providerId
-
 
416
         - cod
-
 
417
        """
-
 
418
        try:
-
 
419
            return mark_orders_as_shipped_from_warehouse(warehouseId, providerId, cod)
-
 
420
        finally:
-
 
421
            close_session()
-
 
422
 
407
    def markOrdersAsPickedUp(self, providerId, pickupDetails):
423
    def markOrdersAsPickedUp(self, providerId, pickupDetails):
408
        """
424
        """
409
        Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
425
        Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
410
        Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
426
        Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
411
        Raises an exception if we encounter report for an AWB number that we did not ship.
427
        Raises an exception if we encounter report for an AWB number that we did not ship.