Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.wirabumi.gen.oez.porting;
- import java.util.List;
- import org.openbravo.base.exception.OBException;
- import org.openbravo.base.secureApp.VariablesSecureApp;
- import org.openbravo.dal.service.OBDal;
- import org.openbravo.model.ad.ui.Tab;
- import org.openbravo.model.common.order.Order;
- import org.wirabumi.gen.oez.event.DocumentRoutingHandlerAction;
- public class orderActionHandlerForWaitingRelease extends DocumentRoutingHandlerAction {
- @Override
- public void doRouting(String adWindowId, String adTabId, String doc_status_to, VariablesSecureApp vars,
- List<String> recordId) {
- // TODO Auto-generated method stub
- if (!doc_status_to.toLowerCase().contains("oez_waitingrelease")) {
- throw new OBException("@ActionNotAllowedHere@");
- }
- for (String orderID : recordId) {
- Order order = OBDal.getInstance().get(Order.class, orderID);
- order.setDocumentAction(doc_status_to);
- order.setProcessed(true);
- OBDal.getInstance().save(order);
- OBDal.getInstance().flush();
- }
- }
- @Override
- public String getCoDocumentNo(String recordID, Tab tab) {
- // TODO Auto-generated method stub
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement