diff --git a/migration/360lts-release/oracle/923_PlaceHolder.sql b/migration/360lts-release/oracle/923_PlaceHolder.sql new file mode 100644 index 0000000000..097ff34634 --- /dev/null +++ b/migration/360lts-release/oracle/923_PlaceHolder.sql @@ -0,0 +1 @@ +-- Just a placeholder diff --git a/migration/360lts-release/oracle/923_IDEMPIERE_379.sql b/migration/360lts-release/oracle/952_IDEMPIERE_379.sql similarity index 98% rename from migration/360lts-release/oracle/923_IDEMPIERE_379.sql rename to migration/360lts-release/oracle/952_IDEMPIERE_379.sql index 3c71740d34..be9728b741 100644 --- a/migration/360lts-release/oracle/923_IDEMPIERE_379.sql +++ b/migration/360lts-release/oracle/952_IDEMPIERE_379.sql @@ -96,7 +96,7 @@ INSERT INTO AD_ToolBarButton (Name,ComponentName,IsCustomization,KeyStroke_KeyCo -- Oct 30, 2012 10:00:40 AM COT -- IDEMPIERE-379 Reporting wizard for end users -UPDATE AD_ToolBarButton SET Name='ReportWizard', ComponentName='Wizard',Updated=TO_DATE('2012-10-30 10:00:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200066 +UPDATE AD_ToolBarButton SET Name='Report - Wizard', ComponentName='Wizard',Updated=TO_DATE('2012-10-30 10:00:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200066 ; -- Oct 30, 2012 10:08:19 AM COT @@ -139,7 +139,6 @@ INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,V INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Message_Trl_UU ) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=200100 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) ; - SELECT register_migration_script('923_IDEMPIERE_379.sql') FROM dual ; diff --git a/migration/360lts-release/postgresql/923_PlaceHolder.sql b/migration/360lts-release/postgresql/923_PlaceHolder.sql new file mode 100644 index 0000000000..097ff34634 --- /dev/null +++ b/migration/360lts-release/postgresql/923_PlaceHolder.sql @@ -0,0 +1 @@ +-- Just a placeholder diff --git a/migration/360lts-release/postgresql/923_IDEMPIERE_379.sql b/migration/360lts-release/postgresql/952_IDEMPIERE_379.sql similarity index 98% rename from migration/360lts-release/postgresql/923_IDEMPIERE_379.sql rename to migration/360lts-release/postgresql/952_IDEMPIERE_379.sql index bf31a65b00..2cc79d1504 100644 --- a/migration/360lts-release/postgresql/923_IDEMPIERE_379.sql +++ b/migration/360lts-release/postgresql/952_IDEMPIERE_379.sql @@ -94,10 +94,9 @@ INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTransla INSERT INTO AD_ToolBarButton (Name,ComponentName,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers,AD_Client_ID,AD_Org_ID,Created,CreatedBy,AD_ToolBarButton_ID,Updated,UpdatedBy,IsActive,AD_ToolBarButton_UU,"action") VALUES ('Zk-ReportWizard','org.idempiere.ui.report','N',0,0,0,0,TO_TIMESTAMP('2012-10-29 11:56:09','YYYY-MM-DD HH24:MI:SS'),100,200066,TO_TIMESTAMP('2012-10-29 11:56:09','YYYY-MM-DD HH24:MI:SS'),100,'Y','6009b32b-e28e-4c13-87fc-4df00c5730c9','R') ; - -- Oct 30, 2012 10:00:40 AM COT -- IDEMPIERE-379 Reporting wizard for end users -UPDATE AD_ToolBarButton SET Name='ReportWizard', ComponentName='Wizard',Updated=TO_TIMESTAMP('2012-10-30 10:00:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200066 +UPDATE AD_ToolBarButton SET Name='Report - Wizard', ComponentName='Wizard',Updated=TO_TIMESTAMP('2012-10-30 10:00:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200066 ; -- Oct 30, 2012 10:08:19 AM COT @@ -130,7 +129,6 @@ UPDATE AD_Message SET MsgText='Fields Displayed',Updated=TO_TIMESTAMP('2012-10-3 UPDATE AD_Message_Trl SET IsTranslated='N' WHERE AD_Message_ID=200091 ; - -- Oct 30, 2012 5:34:18 PM COT -- IDEMPIERE-379 Reporting wizard for end users INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Client_ID,AD_Org_ID,Created) VALUES ('I','Run Report',200100,'D','5638ff96-ff60-49f0-9871-004f7fa2420e','Run','Y',TO_TIMESTAMP('2012-10-30 17:34:15','YYYY-MM-DD HH24:MI:SS'),100,100,0,0,TO_TIMESTAMP('2012-10-30 17:34:15','YYYY-MM-DD HH24:MI:SS')) diff --git a/org.adempiere.base/src/org/compiere/model/SystemIDs.java b/org.adempiere.base/src/org/compiere/model/SystemIDs.java index 02cff20255..a225d2b4fd 100644 --- a/org.adempiere.base/src/org/compiere/model/SystemIDs.java +++ b/org.adempiere.base/src/org/compiere/model/SystemIDs.java @@ -48,6 +48,7 @@ public class SystemIDs public final static int FORM_PAYMENT_PRINT_EXPORT = 106; public final static int FORM_ARCHIVEVIEWER = 118; + public final static int FORM_REPORT_WIZARD = 200002; public final static int MENU_NOTICE = 233; @@ -154,6 +155,4 @@ public class SystemIDs public final static int SCHEDULE_10_MINUTES = 200002; public final static int SCHEDULE_15_MINUTES = 200003; - public final static int WIZARD_REPORT_FORM=200002; - } diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java index 68956a5776..c9924c3428 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java @@ -59,7 +59,7 @@ public class MPrintFormat extends X_AD_PrintFormat /** * */ - private static final long serialVersionUID = 1246145881920021984L; + private static final long serialVersionUID = -8307496567084341384L; /** * Public Constructor. @@ -83,6 +83,10 @@ public class MPrintFormat extends X_AD_PrintFormat m_items = getItems(); } // MPrintFormat + public void reloadItems() { + m_items = getItems(); + } + /** * Load Constructor * @param ctx context diff --git a/org.adempiere.base/src/org/compiere/print/ReportEngine.java b/org.adempiere.base/src/org/compiere/print/ReportEngine.java index e4814452f6..c2bfac86c5 100644 --- a/org.adempiere.base/src/org/compiere/print/ReportEngine.java +++ b/org.adempiere.base/src/org/compiere/print/ReportEngine.java @@ -191,6 +191,7 @@ public class ReportEngine implements PrintServiceAttributeListener public void setPrintFormat (MPrintFormat pf) { m_printFormat = pf; + pf.reloadItems(); if (m_layout != null) { setPrintData(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java index 4d6e5b45ab..14348e73b1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java @@ -704,7 +704,7 @@ public class ADSortTab extends Panel implements IADTabpanel * List Item * @author Teo Sarca */ - public class ListElement extends NamePair { + private class ListElement extends NamePair { /** * */ diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java index 7505a85fb3..92d6fcfe36 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java @@ -20,7 +20,6 @@ import java.util.Properties; import java.util.logging.Level; import org.adempiere.webui.apps.AEnv; -import org.adempiere.webui.apps.WReport; import org.adempiere.webui.component.Button; import org.adempiere.webui.component.ConfirmPanel; import org.adempiere.webui.component.Grid; @@ -47,7 +46,6 @@ import org.adempiere.webui.window.FDialog; import org.adempiere.webui.window.ZkReportViewer; import org.adempiere.webui.window.ZkReportViewerProvider; import org.compiere.model.MRole; -import org.compiere.model.SystemIDs; import org.compiere.print.MPrintFormat; import org.compiere.print.MPrintFormatItem; import org.compiere.print.ReportEngine; @@ -66,9 +64,7 @@ import org.zkoss.zul.Filedownload; import org.zkoss.zul.Foot; import org.zkoss.zul.Footer; import org.zkoss.zul.Hbox; -import org.zkoss.zul.Iframe; import org.zkoss.zul.Separator; -import org.zkoss.zul.Toolbarbutton; import org.zkoss.zul.Vbox; @@ -106,7 +102,7 @@ public class WReportCustomization implements IFormController,EventListener= 0) - { - SessionManager.getAppDesktop().unregisterWindow(m_WindowNo); - m_ctx = null; - m_WindowNo = -1; - } - } - @Override public void onEvent(Event event) throws Exception { if (Events.ON_CLICK.equals(event.getName())) { @@ -567,65 +521,53 @@ public class WReportCustomization implements IFormController,EventListener listColumns=new ArrayList(); - Window wind=new Window(); SimpleListModel sortModel; - private ReportEngine m_reportEngine=null; - - private static CLogger log = CLogger.getCLogger(WRC2FieldOrderPanel.class); public WRC2FieldOrderPanel() { super(); - } - public Window getWind() { - return wind; - } - - - public void setWind(Window wind) { - this.wind = wind; - } - - - /** - * Static Layout - * @throws Exception - */ - public void setReportEngine(ReportEngine re) { - m_reportEngine = re; - - } - public void setListColumns() { listColumns = new ArrayList(); if (m_pfi != null && m_pfi.length > 0) { @@ -93,7 +67,6 @@ public class WRC2FieldOrderPanel extends WRCTabPanel implements EventListener yesItems=new ArrayList(); public ArrayList noItems=new ArrayList(); @@ -72,16 +65,6 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener public WRC3SortCriteriaPanel() { super(); - //m_WindowNo = SessionManager.getAppDesktop().registerWindow(this); - } - - /** - * Static Layout - * @throws Exception - */ - public void setReportEngine(ReportEngine re) { - - m_reportEngine = re; } public void init() @@ -128,7 +111,6 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener yesList.setItemDraggable(true); noList.setItemDraggable(true); - EventListener yesListMouseMotionListener = new EventListener() { public void onEvent(Event event) throws Exception { @@ -193,8 +175,6 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener listHeader.appendChild(noLabel); listHeader.setParent(listHead); - - Hlayout hlayout = new Hlayout(); hlayout.setVflex("true"); hlayout.setHflex("true"); @@ -235,12 +215,8 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener this.appendChild(hlayout); } - - - @Override public void onEvent(Event event) throws Exception { - // TODO Auto-generated method stub } @@ -310,12 +286,9 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener } } - - @Override public void updatePFI() { // pfi is being updated on every refresh - } /** @@ -373,7 +346,7 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener * Move within Yes List * @param event event */ - void migrateValueWithinYesList (Event event) + private void migrateValueWithinYesList (Event event) { Object[] selObjects = yesList.getSelectedItems().toArray(); if (selObjects == null) @@ -432,27 +405,25 @@ public class WRC3SortCriteriaPanel extends WRCTabPanel implements EventListener } } // migrateValueWithinYesList - public void updateYesList(){ yesList.removeAllItems(); wc.setIsChanged(true); int sortNo=10; for(int i=0;i orderfield=new ArrayList(); @@ -47,7 +45,6 @@ public class WRC4GroupingCriteriaPanel extends WRCTabPanel implements EventListe super(); } - @Override public void refresh() { orderfield = new ArrayList(); @@ -61,22 +58,20 @@ public class WRC4GroupingCriteriaPanel extends WRCTabPanel implements EventListe @Override public void updatePFI() { - for(int i=0 ; i { /** * @@ -43,7 +40,6 @@ public class WRC5SummaryFieldsPanel extends WRCTabPanel implements EventListener private static final long serialVersionUID = -2231369601903381581L; private static final int RENDER_IN_COLUMNS=10; - private MPrintFormat m_printFormat; Checkbox m_chkSum[]=null; Checkbox m_chkCount[]=null; Checkbox m_chkMin[]=null; @@ -58,13 +54,11 @@ public class WRC5SummaryFieldsPanel extends WRCTabPanel implements EventListener super(); } - public void init(){ Window wind=new Window(); wind.setWidth("90%"); wind.setHeight("100%"); wind.setHflex("1"); - grid.setHflex("1"); grid.setHeight("90%"); @@ -78,7 +72,6 @@ public class WRC5SummaryFieldsPanel extends WRCTabPanel implements EventListener wind.appendChild(div); this.appendChild(wind); - if (AEnv.isTablet()) { LayoutUtils.addSclass("tablet-scrolling", div); @@ -88,14 +81,11 @@ public class WRC5SummaryFieldsPanel extends WRCTabPanel implements EventListener grid.appendChild(columns); Column cols[] = new Column[RENDER_IN_COLUMNS]; int width = 100/RENDER_IN_COLUMNS; - int widthChk = width/5; for(int i=0;i, ITab /** * */ - private static final long serialVersionUID = 2079827289589862794L; + private static final long serialVersionUID = 344552813342946104L; /** Window No */ private int m_WindowNo = -1; @@ -308,12 +308,11 @@ public class ZkReportViewer extends Window implements EventListener, ITab bRefresh.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh"))); toolBar.appendChild(bRefresh); bRefresh.addEventListener(Events.ON_CLICK, this); - + bWizard.setImage("/images/Wizard24.png"); bWizard.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "PrintWizard"))); toolBar.appendChild(bWizard); bWizard.addEventListener(Events.ON_CLICK, this); - North north = new North(); layout.appendChild(north); @@ -923,7 +922,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab /** * Report Combo - Start other Report or create new one */ - public void cmd_report() + private void cmd_report() { ListItem li = comboReport.getSelectedItem(); if(li == null || li.getValue() == null) return; @@ -1104,23 +1103,18 @@ public class ZkReportViewer extends Window implements EventListener, ITab /*IDEMPIERE -379*/ private void cmd_Wizard() { - int AD_Window_ID = WINDOW_PRINTFORMAT; // hardcoded - int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID(); - - Env.setContext(m_ctx, "AD_PrintFormat_ID", AD_PrintFormat_ID); + int AD_PrintFormat_ID = m_reportEngine.getPrintFormat().get_ID(); - ADForm form = ADForm.openForm(SystemIDs.WIZARD_REPORT_FORM); - WReportCustomization av = (WReportCustomization) form.getICustomForm(); - av.setReportEngine(m_reportEngine); + Env.setContext(m_ctx, "AD_PrintFormat_ID", AD_PrintFormat_ID); + + ADForm form = ADForm.openForm(SystemIDs.FORM_REPORT_WIZARD); + WReportCustomization av = (WReportCustomization) form.getICustomForm(); + av.setReportEngine(m_reportEngine); + + form.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED); + SessionManager.getAppDesktop().showWindow(form); + } // cmd_Wizard - form.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED); - SessionManager.getAppDesktop().showWindow(form); - - //ZkReportCustomization zkCustomization = new ZkReportCustomization(m_reportEngine); - //zkCustomization.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED); - //zkCustomization.setAttribute(Window.INSERT_POSITION_KEY, Window.INSERT_NEXT); - //SessionManager.getAppDesktop().showWindow(zkCustomization); - } // cmd_customize //-- ComponentCtrl --// public Object getExtraCtrl() { return new ExtraCtrl();