Subversion Repositories SmartDukaan

Rev

Rev 35732 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35732 Rev 35738
Line 865... Line 865...
865
    # Add location -1 for each item
865
    # Add location -1 for each item
866
    itemLocationAvailability = ItemLocationAvailabilityCache()
866
    itemLocationAvailability = ItemLocationAvailabilityCache()
867
    itemLocationAvailability.item_id = item_id
867
    itemLocationAvailability.item_id = item_id
868
    itemLocationAvailability.location_id = -1
868
    itemLocationAvailability.location_id = -1
869
    session.commit()
869
    session.commit()
-
 
870
    session.expunge_all()
870
 
871
 
871
 
872
 
872
def __update_item_availability_cache(item_id, source_id, item=None):
873
def __update_item_availability_cache(item_id, source_id, item=None):
873
    """
874
    """
874
    Then how shoud we handle virtual because for both source virtual gonna mark
875
    Then how shoud we handle virtual because for both source virtual gonna mark
Line 1001... Line 1002...
1001
    item_availability_cache.sellingPrice = item.sellingPrice
1002
    item_availability_cache.sellingPrice = item.sellingPrice
1002
    item_availability_cache.totalAvailability = total_availability
1003
    item_availability_cache.totalAvailability = total_availability
1003
    # item_availability_cache.location = warehouse.logisticsLocation 
1004
    # item_availability_cache.location = warehouse.logisticsLocation 
1004
    item_availability_cache.weight = 1000 * item.weight if item.weight else 300
1005
    item_availability_cache.weight = 1000 * item.weight if item.weight else 300
1005
    session.commit()
1006
    session.commit()
-
 
1007
    session.expunge_all()
1006
 
1008
 
1007
 
1009
 
1008
def __get_warehouse_with_min_transfer_price(warehouses, ignoredWhs, item_id, item_pricing, ignoreAvailability):
1010
def __get_warehouse_with_min_transfer_price(warehouses, ignoredWhs, item_id, item_pricing, ignoreAvailability):
1009
    warehouse_retid = -1
1011
    warehouse_retid = -1
1010
    minTransferPrice = None
1012
    minTransferPrice = None