hg merge release-3.1 (merge release3.1 into development)

This commit is contained in:
Carlos Ruiz 2016-08-11 11:39:15 +02:00
commit 059a9ee240
30 changed files with 3713 additions and 48 deletions

View File

@ -306,6 +306,7 @@ AS
ON il.c_charge_id = c.c_charge_id ON il.c_charge_id = c.c_charge_id
LEFT JOIN c_charge_trl ct LEFT JOIN c_charge_trl ct
ON il.c_charge_id = ct.c_charge_id ON il.c_charge_id = ct.c_charge_id
AND uomt.ad_language = ct.ad_language
LEFT JOIN c_bpartner_product pp LEFT JOIN c_bpartner_product pp
ON il.m_product_id = pp.m_product_id ON il.m_product_id = pp.m_product_id
AND i.c_bpartner_id = pp.c_bpartner_id AND i.c_bpartner_id = pp.c_bpartner_id

View File

@ -233,6 +233,7 @@ AS
ON iol.c_charge_id = c.c_charge_id ON iol.c_charge_id = c.c_charge_id
LEFT JOIN c_charge_trl ct LEFT JOIN c_charge_trl ct
ON iol.c_charge_id = ct.c_charge_id ON iol.c_charge_id = ct.c_charge_id
AND uomt.ad_language = ct.ad_language
UNION UNION
SELECT iol.ad_client_id, SELECT iol.ad_client_id,
iol.ad_org_id, iol.ad_org_id,

View File

@ -264,7 +264,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
LEFT JOIN c_charge c LEFT JOIN c_charge c
ON il.c_charge_id = c.c_charge_id ON il.c_charge_id = c.c_charge_id
LEFT JOIN c_charge_trl ct LEFT JOIN c_charge_trl ct
ON il.c_charge_id = ct.c_charge_id ON il.c_charge_id = ct.c_charge_id AND uomt.ad_language = ct.ad_language
LEFT JOIN c_bpartner_product pp LEFT JOIN c_bpartner_product pp
ON il.m_product_id = pp.m_product_id AND i.c_bpartner_id = pp.c_bpartner_id ON il.m_product_id = pp.m_product_id AND i.c_bpartner_id = pp.c_bpartner_id
LEFT JOIN m_product_trl pt LEFT JOIN m_product_trl pt
@ -534,7 +534,7 @@ CREATE OR REPLACE VIEW c_invoice_linetax_vt AS
ON bl.m_product_id = pt.m_product_id AND uomt.ad_language = pt.ad_language ON bl.m_product_id = pt.m_product_id AND uomt.ad_language = pt.ad_language
LEFT JOIN c_tax t LEFT JOIN c_tax t
ON il.c_tax_id = t.c_tax_id ON il.c_tax_id = t.c_tax_id
LEFT JOIN c_tax_trl tt LEFT JOIN c_tax_trl tt
ON il.c_tax_id = tt.c_tax_id AND uomt.ad_language = tt.ad_language ON il.c_tax_id = tt.c_tax_id AND uomt.ad_language = tt.ad_language
LEFT JOIN m_attributesetinstance asi LEFT JOIN m_attributesetinstance asi
ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id) ON il.m_attributesetinstance_id = asi.m_attributesetinstance_id)

View File

@ -1,4 +1,4 @@
DROP VIEW m_inout_line_vt; DROP VIEW m_inout_line_vt;
CREATE OR REPLACE VIEW m_inout_line_vt AS CREATE OR REPLACE VIEW m_inout_line_vt AS
SELECT iol.ad_client_id, SELECT iol.ad_client_id,
@ -214,7 +214,7 @@ FROM m_inoutline iol
LEFT JOIN c_charge c LEFT JOIN c_charge c
ON iol.c_charge_id = c.c_charge_id ON iol.c_charge_id = c.c_charge_id
LEFT JOIN c_charge_trl ct LEFT JOIN c_charge_trl ct
ON iol.c_charge_id = ct.c_charge_id ON iol.c_charge_id = ct.c_charge_id AND uomt.ad_language = ct.ad_language
UNION SELECT iol.ad_client_id, UNION SELECT iol.ad_client_id,
iol.ad_org_id, iol.ad_org_id,
iol.isactive, iol.isactive,

View File

@ -0,0 +1,9 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-2428
-- Jul 28, 2016 12:08:00 PM CEST
drop index m_inoutlinema_key;
SELECT register_migration_script('201607281208_IDEMPIERE-2428.sql') FROM dual
;

View File

@ -0,0 +1,11 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
-- Aug 3, 2016 12:25:05 PM CEST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','{0} resolved multiple times = ({1})',0,0,'Y',TO_DATE('2016-08-03 12:25:05','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2016-08-03 12:25:05','YYYY-MM-DD HH24:MI:SS'),100,200405,'ForeignMultipleResolved','D','3c350f49-c813-4ebc-ae1a-5d4b2fc76faa')
;
SELECT register_migration_script('201608031225_IDEMPIERE-3146.sql') FROM dual
;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3153 Allow negative BOM Product lines for co/by-products
-- Aug 7, 2016 12:51:02 PM CEST
UPDATE AD_Column SET ValueMin=NULL,Updated=TO_DATE('2016-08-07 12:51:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4723
;
SELECT register_migration_script('201608071251_IDEMPIERE-3153.sql') FROM dual
;

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-2065 flag Pay Schedule valid of invoice customer is not update in some case, make invoice not list in search when payment
-- Aug 7, 2016 1:50:22 PM CEST
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2016-08-07 13:50:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=10326
;
-- Aug 7, 2016 1:50:27 PM CEST
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2016-08-07 13:50:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=60152
;
SELECT register_migration_script('201608071350_IDEMPIERE-2065.sql') FROM dual
;

View File

@ -0,0 +1,4 @@
-- just for oracle
SELECT register_migration_script('201607281208_IDEMPIERE-2428.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
-- Aug 3, 2016 12:25:05 PM CEST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('E','{0} resolved multiple times = ({1})',0,0,'Y',TO_TIMESTAMP('2016-08-03 12:25:05','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2016-08-03 12:25:05','YYYY-MM-DD HH24:MI:SS'),100,200405,'ForeignMultipleResolved','D','3c350f49-c813-4ebc-ae1a-5d4b2fc76faa')
;
SELECT register_migration_script('201608031225_IDEMPIERE-3146.sql') FROM dual
;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
-- IDEMPIERE-3153 Allow negative BOM Product lines for co/by-products
-- Aug 7, 2016 12:51:02 PM CEST
UPDATE AD_Column SET ValueMin=NULL,Updated=TO_TIMESTAMP('2016-08-07 12:51:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4723
;
SELECT register_migration_script('201608071251_IDEMPIERE-3153.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
-- IDEMPIERE-2065 flag Pay Schedule valid of invoice customer is not update in some case, make invoice not list in search when payment
-- Aug 7, 2016 1:50:22 PM CEST
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2016-08-07 13:50:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=10326
;
-- Aug 7, 2016 1:50:27 PM CEST
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2016-08-07 13:50:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=60152
;
SELECT register_migration_script('201608071350_IDEMPIERE-2065.sql') FROM dual
;

View File

@ -958,7 +958,7 @@ public class GridTabCSVImporter implements IGridTabImporter
if(idS == null && id < 0){ if(idS == null && id < 0){
//it could be that record still doesn't exist if import mode is inserting or merging //it could be that record still doesn't exist if import mode is inserting or merging
if(isUpdateMode()) if(isUpdateMode())
return new StringBuilder(Msg.getMsg(Env.getCtx(),"ForeignNotResolved",new Object[]{header.get(i),value})); return new StringBuilder(Msg.getMsg(Env.getCtx(),id==-2?"ForeignMultipleResolved":"ForeignNotResolved",new Object[]{header.get(i),value}));
} }
} else { } else {
// no validation here // no validation here
@ -1016,8 +1016,9 @@ public class GridTabCSVImporter implements IGridTabImporter
if(isForeing && !"(null)".equals(value)){ if(isForeing && !"(null)".equals(value)){
String foreignTable = columnName.substring(0,columnName.length()-3); String foreignTable = columnName.substring(0,columnName.length()-3);
if(resolveForeign(foreignTable,foreignColumn,value,null) < 0) int id = resolveForeign(foreignTable,foreignColumn,value,null);
return new StringBuilder(Msg.getMsg(Env.getCtx(), "ForeignNotResolved" ,new Object[]{header.get(j),value})); if (id < 0)
return new StringBuilder(Msg.getMsg(Env.getCtx(), id==-2?"ForeignMultipleResolved":"ForeignNotResolved" ,new Object[]{header.get(j),value}));
} }
isEmptyRow=false; isEmptyRow=false;
} }
@ -1118,7 +1119,7 @@ public class GridTabCSVImporter implements IGridTabImporter
id = resolveForeign(foreignTable,foreignColumn,value,trx); id = resolveForeign(foreignTable,foreignColumn,value,trx);
if(idS == null && id < 0) if(idS == null && id < 0)
return Msg.getMsg(Env.getCtx(),"ForeignNotResolved",new Object[]{header.get(i),value}); return Msg.getMsg(Env.getCtx(),id==-2?"ForeignMultipleResolved":"ForeignNotResolved",new Object[]{header.get(i),value});
if(id >= 0) if(id >= 0)
logMsg = gridTab.setValue(field,id); logMsg = gridTab.setValue(field,id);
@ -1160,9 +1161,9 @@ public class GridTabCSVImporter implements IGridTabImporter
} else { } else {
int id = resolveForeign(foreignTable, foreignColumn, value,trx); int id = resolveForeign(foreignTable, foreignColumn, value,trx);
if(id < 0) if (id < 0)
return Msg.getMsg(Env.getCtx(),"ForeignNotResolved",new Object[]{header.get(i),value}); return Msg.getMsg(Env.getCtx(),id==-2?"ForeignMultipleResolved":"ForeignNotResolved",new Object[]{header.get(i),value});
setValue = id; setValue = id;
if (field.isParentValue()) { if (field.isParentValue()) {
int actualId = (Integer) field.getValue(); int actualId = (Integer) field.getValue();
@ -1278,8 +1279,8 @@ public class GridTabCSVImporter implements IGridTabImporter
setValue = idS; setValue = idS;
} else { } else {
int id = resolveForeign(foreignTable, foreignColumn, setValue,trx); int id = resolveForeign(foreignTable, foreignColumn, setValue,trx);
if(id < 0) if (id < 0)
return Msg.getMsg(Env.getCtx(),"ForeignNotResolved",new Object[]{columnName,setValue}); return Msg.getMsg(Env.getCtx(),id==-2?"ForeignMultipleResolved":"ForeignNotResolved",new Object[]{columnName,setValue});
setValue = id; setValue = id;
} }
@ -1452,22 +1453,40 @@ public class GridTabCSVImporter implements IGridTabImporter
private int resolveForeign(String foreignTable, String foreignColumn, Object value,Trx trx) { private int resolveForeign(String foreignTable, String foreignColumn, Object value,Trx trx) {
int id = -1; int id = -1;
String trxName = (trx!=null?trx.getTrxName():null);
StringBuilder select = new StringBuilder("SELECT ") boolean systemAccess = false;
.append(foreignTable).append("_ID FROM ") if (!"AD_Client".equals(foreignTable)) {
.append(foreignTable).append(" WHERE ")
.append(foreignColumn).append("=? AND IsActive='Y' AND AD_Client_ID=?");
id = DB.getSQLValueEx(trxName, select.toString(), value, Env.getAD_Client_ID(Env.getCtx()));
if (id == -1 && !"AD_Client".equals(foreignTable)) {
MTable ft = MTable.get(Env.getCtx(), foreignTable); MTable ft = MTable.get(Env.getCtx(), foreignTable);
String accessLevel = ft.getAccessLevel(); String accessLevel = ft.getAccessLevel();
if ( MTable.ACCESSLEVEL_All.equals(accessLevel) if ( MTable.ACCESSLEVEL_All.equals(accessLevel)
|| MTable.ACCESSLEVEL_SystemOnly.equals(accessLevel) || MTable.ACCESSLEVEL_SystemOnly.equals(accessLevel)
|| MTable.ACCESSLEVEL_SystemPlusClient.equals(accessLevel)) { || MTable.ACCESSLEVEL_SystemPlusClient.equals(accessLevel)) {
// try System client if the table has System access systemAccess = true;
id = DB.getSQLValueEx(trxName, select.toString(), value, 0);
} }
} }
String trxName = (trx!=null?trx.getTrxName():null);
StringBuilder postSelect = new StringBuilder(" FROM ")
.append(foreignTable).append(" WHERE ")
.append(foreignColumn).append("=? AND IsActive='Y' AND AD_Client_ID");
if (systemAccess) {
postSelect.append(" IN (0,?)");
} else {
postSelect.append("=?");
}
StringBuilder selectCount = new StringBuilder("SELECT COUNT(*)").append(postSelect);
int count = DB.getSQLValueEx(trxName, selectCount.toString(), value, Env.getAD_Client_ID(Env.getCtx()));
if (count == 1) { // single value found, OK
StringBuilder selectId = new StringBuilder("SELECT ").append(foreignTable).append("_ID").append(postSelect);
id = DB.getSQLValueEx(trxName, selectId.toString(), value, Env.getAD_Client_ID(Env.getCtx()));
} else if (count > 1) { // multiple values found, error ForeignMultipleResolved
id = -2;
} else if (count == 0) { // no values found, error ForeignNotResolved
id = -3;
}
return id; return id;
} }

View File

@ -48,7 +48,7 @@ public class MatchInvReverse extends SvrProcess {
if (inv.get_ID() != p_M_MatchInv_ID) if (inv.get_ID() != p_M_MatchInv_ID)
throw new AdempiereException("@NotFound@ @M_MatchInv_ID@ " + p_M_MatchInv_ID); throw new AdempiereException("@NotFound@ @M_MatchInv_ID@ " + p_M_MatchInv_ID);
if (inv.isPosted()) if (inv.isProcessed())
{ {
Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date"); Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date");
if (reversalDate == null) { if (reversalDate == null) {

View File

@ -46,7 +46,7 @@ public class MatchPOReverse extends SvrProcess {
MMatchPO po = new MMatchPO (getCtx(), p_M_MatchPO_ID, get_TrxName()); MMatchPO po = new MMatchPO (getCtx(), p_M_MatchPO_ID, get_TrxName());
if (po.get_ID() != p_M_MatchPO_ID) if (po.get_ID() != p_M_MatchPO_ID)
throw new AdempiereException("@NotFound@ @M_MatchPO_ID@ " + p_M_MatchPO_ID); throw new AdempiereException("@NotFound@ @M_MatchPO_ID@ " + p_M_MatchPO_ID);
if (po.isPosted()) if (po.isProcessed())
{ {
Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date"); Timestamp reversalDate = Env.getContextAsDate(getCtx(), "#Date");
if (reversalDate == null) { if (reversalDate == null) {

View File

@ -35,13 +35,14 @@ public class LogAuthFailure {
private static FileOutputStream file = null; private static FileOutputStream file = null;
private static Writer writer; private static Writer writer;
public static String authFailureFilename = "AuthFailure.log";
/** Logger */ /** Logger */
private static CLogger log = CLogger.getCLogger(LogAuthFailure.class); private static CLogger log = CLogger.getCLogger(LogAuthFailure.class);
public LogAuthFailure() { public LogAuthFailure() {
String path = Ini.getAdempiereHome() + File.separator + "log"; String path = Ini.getAdempiereHome() + File.separator + "log";
String name = path + File.separator + "AuthFailure.log"; String name = path + File.separator + authFailureFilename;
File fileName; File fileName;
try { try {
fileName = new File(name); fileName = new File(name);

View File

@ -605,6 +605,10 @@ public class GridField
public Object getDefault(ParseSeq seqGetDefaultValue){ public Object getDefault(ParseSeq seqGetDefaultValue){
Object defaultValue = null; Object defaultValue = null;
for (Character seqType : seqGetDefaultValue){ for (Character seqType : seqGetDefaultValue){
if ( seqType == '3' // default from Expression
&& m_vo.DefaultValue != null
&& m_vo.DefaultValue.toUpperCase().equals("NULL")) // IDEMPIERE-2678
return null;
defaultValue = getDefaultValueByType(seqType); defaultValue = getDefaultValueByType(seqType);
if (defaultValue != null) if (defaultValue != null)
return defaultValue; return defaultValue;

View File

@ -39,8 +39,7 @@ public class MAcctSchema extends X_C_AcctSchema
/** /**
* *
*/ */
private static final long serialVersionUID = -7228171623905614596L; private static final long serialVersionUID = 8940388112876468770L;
/** /**
* Get AccountSchema of Client * Get AccountSchema of Client
@ -201,8 +200,6 @@ public class MAcctSchema extends X_C_AcctSchema
} // MAcctSchema } // MAcctSchema
/** Element List */
private MAcctSchemaElement[] m_elements = null;
/** GL Info */ /** GL Info */
private MAcctSchemaGL m_gl = null; private MAcctSchemaGL m_gl = null;
/** Default Info */ /** Default Info */
@ -228,9 +225,7 @@ public class MAcctSchema extends X_C_AcctSchema
*/ */
public MAcctSchemaElement[] getAcctSchemaElements() public MAcctSchemaElement[] getAcctSchemaElements()
{ {
if (m_elements == null) return MAcctSchemaElement.getAcctSchemaElements(this);
m_elements = MAcctSchemaElement.getAcctSchemaElements(this);
return m_elements;
} // getAcctSchemaElements } // getAcctSchemaElements
/** /**
@ -240,11 +235,8 @@ public class MAcctSchema extends X_C_AcctSchema
*/ */
public MAcctSchemaElement getAcctSchemaElement (String elementType) public MAcctSchemaElement getAcctSchemaElement (String elementType)
{ {
if (m_elements == null) /** Element List */
getAcctSchemaElements(); for (MAcctSchemaElement ase : getAcctSchemaElements()) {
for (int i = 0; i < m_elements.length; i++)
{
MAcctSchemaElement ase = m_elements[i];
if (ase.getElementType().equals(elementType)) if (ase.getElementType().equals(elementType))
return ase; return ase;
} }

View File

@ -40,7 +40,7 @@ public class MInvoicePaySchedule extends X_C_InvoicePaySchedule
/** /**
* *
*/ */
private static final long serialVersionUID = -1529278048406862670L; private static final long serialVersionUID = 4613382619117842586L;
/** /**
* Get Payment Schedule of the invoice * Get Payment Schedule of the invoice
@ -229,7 +229,7 @@ public class MInvoicePaySchedule extends X_C_InvoicePaySchedule
{ {
if (!success) if (!success)
return success; return success;
if (is_ValueChanged("DueAmt")) if (is_ValueChanged("DueAmt") || is_ValueChanged("IsActive"))
{ {
log.fine("afterSave"); log.fine("afterSave");
getParent(); getParent();
@ -239,5 +239,15 @@ public class MInvoicePaySchedule extends X_C_InvoicePaySchedule
return success; return success;
} // afterSave } // afterSave
@Override
protected boolean afterDelete(boolean success) {
if (!success)
return success;
log.fine("afterDelete");
getParent();
m_parent.validatePaySchedule();
m_parent.saveEx();
return success;
}
} // MInvoicePaySchedule } // MInvoicePaySchedule

View File

@ -366,7 +366,7 @@ public class MMatchInv extends X_M_MatchInv
*/ */
public boolean reverse(Timestamp reversalDate) public boolean reverse(Timestamp reversalDate)
{ {
if (this.isPosted() && this.getReversal_ID() == 0) if (this.isProcessed() && this.getReversal_ID() == 0)
{ {
MMatchInv reversal = new MMatchInv (getCtx(), 0, get_TrxName()); MMatchInv reversal = new MMatchInv (getCtx(), 0, get_TrxName());
PO.copyValues(this, reversal); PO.copyValues(this, reversal);

View File

@ -40,7 +40,7 @@ public class MOrderPaySchedule extends X_C_OrderPaySchedule
/** /**
* *
*/ */
private static final long serialVersionUID = -5506706349428999742L; private static final long serialVersionUID = 2158181283878369676L;
/** /**
* Get Payment Schedule of the Order * Get Payment Schedule of the Order
@ -229,7 +229,7 @@ public class MOrderPaySchedule extends X_C_OrderPaySchedule
{ {
if (!success) if (!success)
return success; return success;
if (is_ValueChanged("DueAmt")) if (is_ValueChanged("DueAmt") || is_ValueChanged("IsActive"))
{ {
log.fine("afterSave"); log.fine("afterSave");
getParent(); getParent();
@ -239,5 +239,15 @@ public class MOrderPaySchedule extends X_C_OrderPaySchedule
return success; return success;
} // afterSave } // afterSave
@Override
protected boolean afterDelete(boolean success) {
if (!success)
return success;
log.fine("afterDelete");
getParent();
m_parent.validatePaySchedule();
m_parent.saveEx();
return success;
}
} // MOrderPaySchedule } // MOrderPaySchedule

View File

@ -391,7 +391,7 @@ public class ImportInventoryMove extends SvrProcess
*/ */
private int getID(String tableName, String whereClause, Object[] values) private int getID(String tableName, String whereClause, Object[] values)
{ {
return new Query(getCtx(),tableName,whereClause,get_TrxName()) return new Query(getCtx(),tableName,whereClause,get_TrxName()).setClient_ID()
.setParameters(values).firstId(); .setParameters(values).firstId();
} }

View File

@ -426,7 +426,7 @@ public class GLJournalGenerate extends SvrProcess
j.setDateDoc(p_DateAcct); j.setDateDoc(p_DateAcct);
j.setDescription(journalGenerator.getDescription()); j.setDescription(journalGenerator.getDescription());
j.setDocumentNo(p_DocumentNo); j.setDocumentNo(p_DocumentNo);
j.setGL_Category_ID(journalGenerator.getGL_Category_ID()); j.set_ValueOfColumn("GL_Category_ID", journalGenerator.getGL_Category_ID()); // can be zero
j.setPostingType(journalGenerator.getPostingType()); j.setPostingType(journalGenerator.getPostingType());
j.setC_AcctSchema_ID(as.getC_AcctSchema_ID()); j.setC_AcctSchema_ID(as.getC_AcctSchema_ID());
j.setC_ConversionType_ID(MConversionType.getDefault(as.getAD_Client_ID())); j.setC_ConversionType_ID(MConversionType.getDefault(as.getAD_Client_ID()));

View File

@ -9,6 +9,10 @@
<param-name>ServerRoot</param-name> <param-name>ServerRoot</param-name>
<param-value>1</param-value> <param-value>1</param-value>
</context-param> </context-param>
<context-param>
<param-name>org.eclipse.jetty.servlet.SessionCookie</param-name>
<param-value>ROOT_SESSIONID</param-value>
</context-param>
<filter> <filter>
<display-name>iDempiere Monitor Filter</display-name> <display-name>iDempiere Monitor Filter</display-name>
<filter-name>idempiereMonitorFilter</filter-name> <filter-name>idempiereMonitorFilter</filter-name>

View File

@ -39,6 +39,7 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.adempiere.util.LogAuthFailure;
import org.apache.ecs.HtmlColor; import org.apache.ecs.HtmlColor;
import org.apache.ecs.xhtml.a; import org.apache.ecs.xhtml.a;
import org.apache.ecs.xhtml.b; import org.apache.ecs.xhtml.b;
@ -382,6 +383,8 @@ public class AdempiereMonitor extends HttpServlet
String fileName = logs[i].getAbsolutePath(); String fileName = logs[i].getAbsolutePath();
if (fileName.equals(fileHandler.getFileName())) if (fileName.equals(fileHandler.getFileName()))
continue; continue;
if (fileName.endsWith(LogAuthFailure.authFailureFilename)) // Do not delete login failure
continue;
if (logs[i].delete()) if (logs[i].delete())
log.warning("Deleted: " + fileName); log.warning("Deleted: " + fileName);
else else

View File

@ -302,7 +302,8 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi
//sameWarehouseCb //sameWarehouseCb
else if (e.getTarget().equals(sameWarehouseCb)) else if (e.getTarget().equals(sameWarehouseCb))
{ {
initBPOrderDetails(((Integer)bPartnerField.getValue()).intValue(), false); int bpId = bPartnerField.getValue() == null?0:((Integer)bPartnerField.getValue()).intValue();
initBPOrderDetails(bpId, false);
} }
else if (e.getTarget().equals(upcField.getComponent())) else if (e.getTarget().equals(upcField.getComponent()))
{ {

View File

@ -1211,7 +1211,11 @@ public final class WAccountDialog extends Window
*/ */
public void valueChange(ValueChangeEvent evt) { public void valueChange(ValueChangeEvent evt) {
Object newValue = evt.getNewValue(); Object newValue = evt.getNewValue();
if (newValue instanceof Integer) if (newValue instanceof Integer) {
Env.setContext(Env.getCtx(), m_WindowNo, "Account_ID", ((Integer)newValue).intValue()); Env.setContext(Env.getCtx(), m_WindowNo, "Account_ID", ((Integer)newValue).intValue());
if (f_SubAcct_ID != null) {
f_SubAcct_ID.dynamicDisplay();
}
}
} }
} // WAccountDialog } // WAccountDialog

View File

@ -4,6 +4,10 @@
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"> version="3.1">
<display-name>iDempiere Web Client</display-name> <display-name>iDempiere Web Client</display-name>
<context-param>
<param-name>org.eclipse.jetty.servlet.SessionCookie</param-name>
<param-value>WEBUI_SESSIONID</param-value>
</context-param>
<servlet> <servlet>
<servlet-name>AtmosphereServlet</servlet-name> <servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class> <servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>