diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index 622b57798d..a60fe4dc2b 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -2387,7 +2387,10 @@ public class GridTable extends AbstractTableModel if (columnName.endsWith ("_ID")) multiRowWHERE.append (tableName).append(".").append(columnName) .append ("=").append (value); - else + else if (value instanceof Timestamp) { + multiRowWHERE.append (tableName).append(".").append(columnName) + .append ("=").append (DB.TO_DATE((Timestamp)value, false)); + }else multiRowWHERE.append (tableName).append(".").append(columnName) .append ("=").append (DB.TO_STRING(value.toString())); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java index c467bf5855..1a3d451780 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java @@ -38,6 +38,7 @@ import org.adempiere.webui.desktop.FavouriteController; import org.adempiere.webui.desktop.IDesktop; import org.adempiere.webui.session.SessionContextListener; import org.adempiere.webui.session.SessionManager; +import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.BrowserToken; import org.adempiere.webui.util.UserPreference; @@ -525,6 +526,9 @@ public class AdempiereWebUI extends Window implements EventListener, IWeb Env.setContext(properties, UserPreference.LANGUAGE_NAME, Env.getContext(Env.getCtx(), UserPreference.LANGUAGE_NAME)); Env.setContext(properties, Env.LANGUAGE, Env.getContext(Env.getCtx(), Env.LANGUAGE)); Env.setContext(properties, AEnv.LOCALE, Env.getContext(Env.getCtx(), AEnv.LOCALE)); + Env.setContext(properties, ITheme.ZK_TOOLBAR_BUTTON_SIZE, Env.getContext(Env.getCtx(), ITheme.ZK_TOOLBAR_BUTTON_SIZE)); + Env.setContext(properties, ITheme.USE_CSS_FOR_WINDOW_SIZE, Env.getContext(Env.getCtx(), ITheme.USE_CSS_FOR_WINDOW_SIZE)); + Env.setContext(properties, ITheme.USE_FONT_ICON_FOR_IMAGE, Env.getContext(Env.getCtx(), ITheme.USE_FONT_ICON_FOR_IMAGE)); Desktop desktop = Executions.getCurrent().getDesktop(); Locale locale = (Locale) desktop.getSession().getAttribute(Attributes.PREFERRED_LOCALE); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java index ade5411867..806cf9f0c6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java @@ -38,6 +38,7 @@ import org.adempiere.webui.component.ToolBarButton; import org.adempiere.webui.event.ToolbarListener; import org.adempiere.webui.part.WindowContainer; import org.adempiere.webui.session.SessionManager; +import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.window.FDialog; @@ -365,7 +366,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener else { Executions.createComponents(ThemeManager.getPreference(), this, null); - String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size"); + String size = Env.getContext(Env.getCtx(), ITheme.ZK_TOOLBAR_BUTTON_SIZE); String suffix = "24.png"; if (!Util.isEmpty(size)) { @@ -738,7 +739,7 @@ public class ADWindowToolbar extends FToolbar implements EventListener } else { - String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size"); + String size = Env.getContext(Env.getCtx(), ITheme.ZK_TOOLBAR_BUTTON_SIZE); String suffix = "24.png"; if (!Util.isEmpty(size)) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java index e6f17ded04..a9fa68cdad 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java @@ -28,6 +28,7 @@ import org.adempiere.webui.component.ToolBarButton; import org.adempiere.webui.component.ZkCssHelper; import org.adempiere.webui.event.ToolbarListener; import org.adempiere.webui.session.SessionManager; +import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.window.WRecordInfo; @@ -384,7 +385,7 @@ public class BreadCrumb extends Div implements EventListener { btn.setName(BTNPREFIX+name); btn.setId(name); Executions.createComponents(ThemeManager.getPreference(), this, null); - String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size"); + String size = Env.getContext(Env.getCtx(), ITheme.ZK_TOOLBAR_BUTTON_SIZE); String suffix = "24.png"; if (!Util.isEmpty(size)) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java index 4795ed3050..b55d16faf1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java @@ -54,4 +54,6 @@ public interface ITheme { public static final String USE_CSS_FOR_WINDOW_SIZE = "#THEME_USE_CSS_FOR_WINDOW_SIZE"; public static final String USE_FONT_ICON_FOR_IMAGE = "#THEME_USE_FONT_ICON_FOR_IMAGE"; + + public static final String ZK_TOOLBAR_BUTTON_SIZE = "#ZK_Toolbar_Button_Size"; } diff --git a/org.adempiere.ui.zk/theme/default/preference.zul b/org.adempiere.ui.zk/theme/default/preference.zul index 19eb44e2e0..78f11ec7a2 100644 --- a/org.adempiere.ui.zk/theme/default/preference.zul +++ b/org.adempiere.ui.zk/theme/default/preference.zul @@ -11,7 +11,7 @@ import org.adempiere.webui.theme.ITheme; import org.compiere.model.MSysConfig; - Env.setContext(Env.getCtx(), "#ZK_Toolbar_Button_Size", "24"); + Env.setContext(Env.getCtx(), ITheme.ZK_TOOLBAR_BUTTON_SIZE, "24"); /* Set the next variable if you want to control browser title in theme */ /* Env.setContext(Env.getCtx(), "#ZK_BROWSER_TITLE", "iDempiere"); */ Env.setContext(Env.getCtx(), ITheme.USE_CSS_FOR_WINDOW_SIZE, "Y"); diff --git a/org.idempiere.parent/pom.xml b/org.idempiere.parent/pom.xml index 12bd5191cd..1ad7d68a62 100644 --- a/org.idempiere.parent/pom.xml +++ b/org.idempiere.parent/pom.xml @@ -539,9 +539,9 @@ - ${project.groupId} + org.idempiere ${idempiere.target} - ${project.version} + 7.1.0-SNAPSHOT diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java index 303228d9e2..c541dbb392 100644 --- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ModelADServiceImpl.java @@ -44,6 +44,8 @@ import javax.xml.ws.WebServiceContext; import org.apache.commons.codec.binary.Base64; import org.apache.cxf.jaxrs.ext.MessageContext; import org.apache.xmlbeans.StringEnumAbstractBase.Table; +import org.apache.xmlbeans.XmlInt; +import org.apache.xmlbeans.impl.values.XmlValueOutOfRangeException; import org.compiere.model.I_AD_Column; import org.compiere.model.Lookup; import org.compiere.model.MColumn; @@ -338,8 +340,16 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic } private int validateParameter(String parameterName, int i) { + return validateParameter(parameterName, i, null); + } + + private int validateParameter(String parameterName, int i, String uuid) { Integer io = Integer.valueOf(i); String string = validateParameter(parameterName, io.toString()); + // Use the UUID only if the returned string is empty to not override the constant value if any + if (string == null || string.equals("0")) + string = uuid; + if (string == null) return -1; if (string.equals(io.toString())) @@ -401,7 +411,15 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic // Validate parameters modelRunProcess.setADMenuID(validateParameter("AD_Menu_ID", modelRunProcess.getADMenuID())); - modelRunProcess.setADProcessID(validateParameter("AD_Process_ID", modelRunProcess.getADProcessID())); + try { + modelRunProcess.setADProcessID(validateParameter("AD_Process_ID", modelRunProcess.getADProcessID())); + } catch(XmlValueOutOfRangeException e) { // Catch the exception when the Process ID is not an Integer + String processUU = getUUIDValue(modelRunProcess.xgetADProcessID()); + if (processUU == null) { + throw e; + } + modelRunProcess.setADProcessID(validateParameter("AD_Process_ID", 0, processUU)); + } modelRunProcess.setADRecordID(validateParameter("AD_Record_ID", modelRunProcess.getADRecordID())); modelRunProcess.setDocAction(validateParameter("DocAction", modelRunProcess.getDocAction())); @@ -422,6 +440,18 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic getCompiereService().disconnect(); } } + + private String getUUIDValue(XmlInt xmlInt) { + if (xmlInt != null) { + // String xml <...> blocks + String content = xmlInt.toString().replaceAll("<[^>]*>", ""); + if (! Util.isEmpty(content, true) && ADLookup.isUUID(content)) + return content; + } + + //No UUID value + return null; + } public WindowTabDataDocument getList(ModelGetListRequestDocument req) { try { @@ -1397,7 +1427,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic new QName("queryData")); int roleid = reqlogin.getRoleID(); - MRole role = new MRole(ctx, roleid, null); + MRole role = MRole.get(ctx, roleid); // start a trx String trxName = localTrxName;