hg merge release-5.1 (merge release5.1 into default)
This commit is contained in:
commit
096a535b28
|
@ -0,0 +1,10 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3648 Bank statement : Error on BeginningBalance when creating a bank statement with empty BankAccount field
|
||||
-- Mar 5, 2018 10:21:44 AM CET
|
||||
UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MIN(CurrentBalance),0) FROM C_BankAccount WHERE C_BankAccount_ID=@C_BankAccount_ID:0@',Updated=TO_DATE('2018-03-05 10:21:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=4919
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201703051030_IDEMPIERE-3648.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,11 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Mar 1, 2018 10:02:34 AM CET
|
||||
-- IDEMPIERE-1298 2Pack: Support copying of data from one client to another
|
||||
UPDATE AD_Val_Rule SET Code='AD_User.AD_Client_ID=@#AD_Client_ID@ AND AD_User.IsLocked=''Y''',Updated=TO_DATE('2018-03-01 10:02:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200067
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201803011003_IDEMPIERE-1800.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
-- IDEMPIERE-3648 Bank statement : Error on BeginningBalance when creating a bank statement with empty BankAccount field
|
||||
-- Mar 5, 2018 10:21:44 AM CET
|
||||
UPDATE AD_Column SET DefaultValue='@SQL=SELECT COALESCE(MIN(CurrentBalance),0) FROM C_BankAccount WHERE C_BankAccount_ID=@C_BankAccount_ID:0@',Updated=TO_TIMESTAMP('2018-03-05 10:21:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=4919
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201703051030_IDEMPIERE-3648.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,8 @@
|
|||
-- Mar 1, 2018 10:02:34 AM CET
|
||||
-- IDEMPIERE-1298 2Pack: Support copying of data from one client to another
|
||||
UPDATE AD_Val_Rule SET Code='AD_User.AD_Client_ID=@#AD_Client_ID@ AND AD_User.IsLocked=''Y''',Updated=TO_TIMESTAMP('2018-03-01 10:02:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200067
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201803011003_IDEMPIERE-1800.sql') FROM dual
|
||||
;
|
||||
|
|
@ -50,7 +50,6 @@ public class ResetLockedAccount extends SvrProcess {
|
|||
|
||||
StringBuilder sql = new StringBuilder ("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=SysDate ")
|
||||
.append(" WHERE IsLocked='Y' AND AD_Client_ID = ? ")
|
||||
.append(" AND DateAccountLocked IS NOT NULL ")
|
||||
.append(" AND AD_User_ID = " + user.getAD_User_ID());
|
||||
int no = DB.executeUpdate(sql.toString(), new Object[] { p_AD_Client_ID }, false, get_TrxName());
|
||||
if (no <= 0)
|
||||
|
@ -65,8 +64,7 @@ public class ResetLockedAccount extends SvrProcess {
|
|||
int MAX_INACTIVE_PERIOD = MSysConfig.getIntValue(MSysConfig.USER_LOCKING_MAX_INACTIVE_PERIOD_DAY, 0);
|
||||
|
||||
StringBuilder sql = new StringBuilder("UPDATE AD_User SET IsLocked = 'N', DateAccountLocked=NULL, FailedLoginCount=0, DateLastLogin=NULL, Updated=SysDate ")
|
||||
.append(" WHERE IsLocked='Y' AND AD_Client_ID = ? ")
|
||||
.append(" AND DateAccountLocked IS NOT NULL");
|
||||
.append(" WHERE IsLocked='Y' AND AD_Client_ID = ? ");
|
||||
|
||||
if (DB.isPostgreSQL())
|
||||
{
|
||||
|
|
|
@ -646,8 +646,8 @@ public class MLocation extends X_C_Location implements Comparator<Object>
|
|||
if (getC_City_ID() <= 0 && getCity() != null && getCity().length() > 0) {
|
||||
int city_id = DB.getSQLValue(
|
||||
get_TrxName(),
|
||||
"SELECT C_City_ID FROM C_City WHERE C_Country_ID=? AND COALESCE(C_Region_ID,0)=? AND Name=?",
|
||||
new Object[] {getC_Country_ID(), getC_Region_ID(), getCity()});
|
||||
"SELECT C_City_ID FROM C_City WHERE C_Country_ID=? AND COALESCE(C_Region_ID,0)=? AND Name=? AND AD_Client_ID IN (0,?)",
|
||||
new Object[] {getC_Country_ID(), getC_Region_ID(), getCity(), getAD_Client_ID()});
|
||||
if (city_id > 0)
|
||||
setC_City_ID(city_id);
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3728896318124756192L;
|
||||
private static final long serialVersionUID = -1639104320722589666L;
|
||||
|
||||
private static final String ON_SAVE_OPEN_PREFERENCE_EVENT = "onSaveOpenPreference";
|
||||
|
||||
|
@ -1343,7 +1343,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
|||
throw new AdempiereException(Msg.getMsg(Env.getCtx(),"RecordIsNotInCurrentSearch"));
|
||||
}
|
||||
|
||||
windowPanel.onTreeNavigate(row);
|
||||
windowPanel.onTreeNavigate(gridTab, row);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -868,13 +868,13 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
/**
|
||||
* @see ToolbarListener#onPrevious()
|
||||
*/
|
||||
public void onTreeNavigate(final int rowIndex)
|
||||
public void onTreeNavigate(final GridTab gt, final int rowIndex)
|
||||
{
|
||||
Callback<Boolean> callback = new Callback<Boolean>() {
|
||||
@Override
|
||||
public void onCallback(Boolean result) {
|
||||
if (result) {
|
||||
adTabbox.getSelectedGridTab().navigate(rowIndex);
|
||||
gt.navigate(rowIndex);
|
||||
//focusToActivePanel();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -476,6 +476,9 @@ public class ProcessParameterPanel extends Panel implements
|
|||
{
|
||||
GridField mField = (GridField)m_mFields.get(j);
|
||||
|
||||
if (!mField.isEditablePara(true))
|
||||
continue; // Saved parameters must not change read-only parameters
|
||||
|
||||
// Get Values
|
||||
WEditor editor = (WEditor)m_wEditors.get(j);
|
||||
WEditor editor2 = (WEditor)m_wEditors2.get(j);
|
||||
|
@ -489,7 +492,6 @@ public class ProcessParameterPanel extends Panel implements
|
|||
MPInstancePara para = params[i];
|
||||
if ( mField.getColumnName().equals(para.getParameterName()) )
|
||||
{
|
||||
|
||||
if (para.getP_Date() != null || para.getP_Date_To() != null )
|
||||
{
|
||||
editor.setValue(para.getP_Date());
|
||||
|
|
|
@ -30,14 +30,22 @@
|
|||
package org.adempiere.webui.dashboard;
|
||||
|
||||
import org.adempiere.webui.apps.graph.WDocumentStatusPanel;
|
||||
import org.adempiere.webui.theme.ThemeManager;
|
||||
import org.adempiere.webui.util.ServerPushTemplate;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.Util;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Image;
|
||||
import org.zkoss.zul.Toolbar;
|
||||
|
||||
public class DPDocumentStatus extends DashboardPanel {
|
||||
public class DPDocumentStatus extends DashboardPanel implements EventListener<Event> {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2089844018551832142L;
|
||||
|
||||
private static final long serialVersionUID = 8569879231642492255L;
|
||||
private WDocumentStatusPanel statusPanel;
|
||||
|
||||
@Override
|
||||
|
@ -54,8 +62,27 @@ public class DPDocumentStatus extends DashboardPanel {
|
|||
public DPDocumentStatus()
|
||||
{
|
||||
super();
|
||||
|
||||
statusPanel = WDocumentStatusPanel.get();
|
||||
if (statusPanel != null) this.appendChild(statusPanel);
|
||||
|
||||
statusPanel = WDocumentStatusPanel.get();
|
||||
if (statusPanel != null)
|
||||
this.appendChild(statusPanel);
|
||||
|
||||
Toolbar recentItemsToolbar = new Toolbar();
|
||||
this.appendChild(recentItemsToolbar);
|
||||
|
||||
Image imgr = new Image(ThemeManager.getThemeResource("images/Refresh24.png"));
|
||||
recentItemsToolbar.appendChild(imgr);
|
||||
imgr.setStyle("text-align: right; cursor: pointer; width:24px; height:24px;");
|
||||
imgr.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh")));
|
||||
imgr.addEventListener(Events.ON_CLICK, this);
|
||||
}
|
||||
|
||||
public void onEvent(Event event) throws Exception {
|
||||
String eventName = event.getName();
|
||||
|
||||
if (eventName.equals(Events.ON_CLICK)) {
|
||||
statusPanel.refresh();
|
||||
statusPanel.updateUI();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -8676586407450465012L;
|
||||
private static final long serialVersionUID = 5041961608373943362L;
|
||||
|
||||
protected Grid parameterGrid;
|
||||
private Borderlayout layout;
|
||||
|
@ -2179,4 +2179,19 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
|
||||
}
|
||||
|
||||
/** Allow to show or hide the sub panel (detail) programmatically */
|
||||
protected void setSouthVisible(boolean visible) {
|
||||
Component comp = layout.getCenter();
|
||||
for (Component c : comp.getChildren()) {
|
||||
if (c instanceof Borderlayout) {
|
||||
for (Component c1 : c.getChildren()) {
|
||||
if (c1 instanceof South) {
|
||||
c1.setVisible(visible);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue