Subversion Repositories SmartDukaan

Rev

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

Rev 5460 Rev 5474
Line 1838... Line 1838...
1838
    else:
1838
    else:
1839
        raise InventoryServiceException(101, 'VendorMapping not found for: ' + itemKey)
1839
        raise InventoryServiceException(101, 'VendorMapping not found for: ' + itemKey)
1840
    session.commit()
1840
    session.commit()
1841
 
1841
 
1842
def reset_availability_for_warehouse(warehouseId):
1842
def reset_availability_for_warehouse(warehouseId):
1843
    CurrentInventorySnapshot.query.filter_by(warehouse_id=warehouseId).delete()
1843
    for currentInventorySnapshot in CurrentInventorySnapshot.query.filter_by(warehouse_id=warehouseId).all():
-
 
1844
        currentInventorySnapshot.availability = 0
1844
    session.commit()
1845
    session.commit()
1845
 
1846
 
1846
def __send_mail(subject, message):
1847
def __send_mail(subject, message):
1847
    try:
1848
    try:
1848
        thread = threading.Thread(target=partial(mail, from_user, from_pwd, to_addresses, subject, message))
1849
        thread = threading.Thread(target=partial(mail, from_user, from_pwd, to_addresses, subject, message))