ItEr57S04ValidacionEProbasFuncionaisItEr56S04: [Bug #496] Fix bug.
Calling useSchedulingDataFor on a reattached entity to fix the bug.
This commit is contained in:
parent
3ae4b9ccd0
commit
efaa551030
3 changed files with 10 additions and 0 deletions
|
|
@ -123,4 +123,6 @@ public interface IOrderModel {
|
|||
|
||||
boolean isAlreadyInUseAndIsOnlyInCurrentScenario(Order order);
|
||||
|
||||
void useSchedulingDataForCurrentScenario(Order order);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -628,6 +628,7 @@ public class OrderCRUDController extends GenericForwardComposer {
|
|||
}
|
||||
|
||||
public void schedule(Order order) {
|
||||
orderModel.useSchedulingDataForCurrentScenario(order);
|
||||
if(orderModel.userCanRead(order, SecurityUtils.getSessionUserLoginName())) {
|
||||
if (order.isScheduled()) {
|
||||
planningControllerEntryPoints.goToScheduleOf(order);
|
||||
|
|
|
|||
|
|
@ -918,4 +918,11 @@ public class OrderModel implements IOrderModel {
|
|||
return isAlreadyInUse(order) && (order.getScenarios().size() == 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public void useSchedulingDataForCurrentScenario(Order order) {
|
||||
orderDAO.reattach(order);
|
||||
order.useSchedulingDataFor(scenarioManager.getCurrent());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue