Subversion Repositories SmartDukaan

Rev

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

Rev 4433 Rev 4448
Line 370... Line 370...
370
            # added the difference in the current inventory    
370
            # added the difference in the current inventory    
371
            current_inventory_snapshot.availibility = current_inventory_snapshot.availibility + quantity
371
            current_inventory_snapshot.availibility = current_inventory_snapshot.availibility + quantity
372
            try:
372
            try:
373
                if quantity > 0 and __get_item_reserved(item) > 0:
373
                if quantity > 0 and __get_item_reserved(item) > 0:
374
                    cl = TransactionClient().get_client()
374
                    cl = TransactionClient().get_client()
-
 
375
                    #FIXME hardcoding for warehouse id 
375
                    cl.addAlert(AlertType.NEW_INVENTORY_ALERT, "Inventory received for item " + item.brand + item.model_name + item.model_number)
376
                    cl.addAlert(AlertType.NEW_INVENTORY_ALERT, 5, "Inventory received for item " + item.brand + " " + item.model_name + " " + item.model_number + " " +  item.color)
376
            except:
377
            except:
377
                print "Not able to raise alert for incoming inventory" 
378
                print "Not able to raise alert for incoming inventory" 
378
        except:
379
        except:
379
            raise InventoryServiceException(108, "Some unforeseen error while updating inventory")
380
            raise InventoryServiceException(108, "Some unforeseen error while updating inventory")
380
        session.commit() 
381
        session.commit()