Ignore:
Timestamp:
Nov 19, 2009, 9:16:21 PM (14 years ago)
Author:
gav
Message:

Improve entry creation so that entryType is passed in with the associated submitButton.
Refactor InventoryMovementService and prevent create/delete of invenotryMovements on complete task.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/InventoryMovementDetailedController.groovy

    r177 r191  
    3434        else {
    3535            if(result.inventoryMovementInstance) {
    36                 render(view:'show',model:[inventoryMovementInstance:result.inventoryMovementInstance])
     36                // For some reason we have to call refresh() here to get a hibernate session
     37                // and avoid a lazy initialisation error.
     38                render(view:'show',model:[inventoryMovementInstance:result.inventoryMovementInstance.refresh()])
    3739            }
    3840            else {
    3941                flash.message = "Could not delete inventory movement."
    40                 redirect(controller:"taskDetailed", action:"search", id:result.taskId)
     42                redirect(controller:"taskDetailed", action:"search")
    4143            }
    4244        }
Note: See TracChangeset for help on using the changeset viewer.