Merged release-1.0c into development

This commit is contained in:
Carlos Ruiz 2013-07-08 08:09:29 -05:00
commit ab9c0e9d6e
8 changed files with 158 additions and 18 deletions

View File

@ -0,0 +1,64 @@
-- Jul 4, 2013 5:39:38 PM COT
-- Hide workflows deprecated
UPDATE AD_Workflow SET IsValid='N', IsActive='N',Updated=TO_DATE('2013-07-04 17:39:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50014
;
-- Jul 6, 2013 5:50:57 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:50:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=119
;
-- Jul 6, 2013 5:51:01 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:51:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50009
;
-- Jul 6, 2013 5:51:11 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:51:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50011
;
-- Jul 6, 2013 5:51:31 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:51:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50008
;
-- Jul 6, 2013 5:51:39 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:51:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50013
;
-- Jul 6, 2013 5:52:09 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:52:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50002
;
-- Jul 6, 2013 5:52:16 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:52:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50005
;
-- Jul 6, 2013 5:52:28 PM COT
UPDATE AD_Workflow SET IsValid='N', IsActive='N',Updated=TO_DATE('2013-07-06 17:52:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50007
;
-- Jul 6, 2013 5:52:36 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:52:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50010
;
-- Jul 6, 2013 5:52:41 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:52:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50006
;
-- Jul 6, 2013 5:53:07 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:53:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50000
;
-- Jul 6, 2013 5:53:11 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:53:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50001
;
-- Jul 6, 2013 5:53:14 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_DATE('2013-07-06 17:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50004
;
-- Jul 6, 2013 5:53:27 PM COT
UPDATE AD_Workflow SET IsValid='N', IsActive='N',Updated=TO_DATE('2013-07-06 17:53:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50003
;
SELECT register_migration_script('20130407174015_IDEMPIERE-632.sql') FROM dual
;

View File

@ -0,0 +1,65 @@
-- Jul 4, 2013 5:39:38 PM COT
-- Hide workflows deprecated
UPDATE AD_Workflow SET IsValid='N', IsActive='N',Updated=TO_TIMESTAMP('2013-07-04 17:39:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50014
;
-- Jul 6, 2013 5:50:57 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:50:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=119
;
-- Jul 6, 2013 5:51:01 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:51:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50009
;
-- Jul 6, 2013 5:51:11 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:51:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50011
;
-- Jul 6, 2013 5:51:31 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:51:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50008
;
-- Jul 6, 2013 5:51:39 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:51:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50013
;
-- Jul 6, 2013 5:52:09 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:52:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50002
;
-- Jul 6, 2013 5:52:16 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:52:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50005
;
-- Jul 6, 2013 5:52:28 PM COT
UPDATE AD_Workflow SET IsValid='N', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:52:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50007
;
-- Jul 6, 2013 5:52:36 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:52:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50010
;
-- Jul 6, 2013 5:52:41 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:52:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50006
;
-- Jul 6, 2013 5:53:07 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:53:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50000
;
-- Jul 6, 2013 5:53:11 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:53:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50001
;
-- Jul 6, 2013 5:53:14 PM COT
UPDATE AD_Workflow SET IsValid='Y', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:53:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50004
;
-- Jul 6, 2013 5:53:27 PM COT
UPDATE AD_Workflow SET IsValid='N', IsActive='N',Updated=TO_TIMESTAMP('2013-07-06 17:53:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Workflow_ID=50003
;
SELECT register_migration_script('20130407174015_IDEMPIERE-632.sql') FROM dual
;

View File

@ -41,6 +41,7 @@ import org.compiere.acct.Fact;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Util;
import org.osgi.service.event.Event;
/**
@ -79,7 +80,7 @@ public class ModelValidationEngine
/** Engine Singleton */
private static ModelValidationEngine s_engine = null;
/* flag to indicate a missing model validation class */
private static String missingModelValidationMessage = null;
private static String missingModelValidationMessage = "";
/**************************************************************************
@ -159,7 +160,7 @@ public class ModelValidationEngine
if (validator == null)
{
missingModelValidationMessage = missingModelValidationMessage +
missingModelValidationMessage = missingModelValidationMessage + " Missing class " + className +
(client != null ? (" on client " + client.getName()) : " global") + '\n';
}
else
@ -273,7 +274,7 @@ public class ModelValidationEngine
if (AD_User_ID == 0 && AD_Role_ID == 0)
; // don't validate for user system on role system
else
if (missingModelValidationMessage != null) {
if (! Util.isEmpty(missingModelValidationMessage)) {
MSystem system = MSystem.get(Env.getCtx());
if (system.isFailOnMissingModelValidator())
return missingModelValidationMessage;

View File

@ -368,7 +368,7 @@ public abstract class AbstractElementHandler implements ElementHandler {
*/
protected boolean isProcessElement(Properties ctx, String entityType) {
if ("D".equals(entityType) || "C".equals(entityType)) {
return "true".equalsIgnoreCase(getUpdateMode(ctx));
return "Y".equalsIgnoreCase(getUpdateMode(ctx));
} else {
return true;
}

View File

@ -191,9 +191,9 @@ public class PackInHandler extends DefaultHandler {
packageInst.saveEx();
}
m_ctx.ctx.put("AD_Package_Imp_ID", String.valueOf(AD_Package_Imp_ID));
m_ctx.ctx.put("UpdateMode", m_updateDictionary);
m_ctx.ctx.put("PackageDirectory", packageDirectory);
Env.setContext(m_ctx.ctx, "AD_Package_Imp_ID", String.valueOf(AD_Package_Imp_ID));
Env.setContext(m_ctx.ctx, "UpdateMode", m_updateDictionary);
Env.setContext(m_ctx.ctx, "PackageDirectory", packageDirectory);
m_ctx.packIn = packIn;
} else {
Element e = new Element(uri, localName, qName, new AttributesImpl(atts));

View File

@ -92,10 +92,16 @@ public class WFEditor extends ADForm {
Borderlayout layout = new Borderlayout();
layout.setStyle("width: 100%; height: 100%; position: absolute;");
appendChild(layout);
String sql = MRole.getDefault().addAccessSQL(
"SELECT AD_Workflow_ID, Name FROM AD_Workflow ORDER BY 2",
String sql;
boolean isBaseLanguage = Env.isBaseLanguage(Env.getCtx(), "AD_Workflow");
if (isBaseLanguage)
sql = MRole.getDefault().addAccessSQL(
"SELECT AD_Workflow_ID, Name FROM AD_Workflow WHERE IsActive='Y' ORDER BY 2",
"AD_Workflow", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); // all
else
sql = MRole.getDefault().addAccessSQL(
"SELECT AD_Workflow.AD_Workflow_ID, AD_Workflow_Trl.Name FROM AD_Workflow INNER JOIN AD_Workflow_Trl ON (AD_Workflow.AD_Workflow_ID=AD_Workflow_Trl.AD_Workflow_ID) "
+ " WHERE AD_Workflow.IsActive='Y' AND AD_Workflow_Trl.AD_Language='"+Env.getAD_Language(Env.getCtx())+"' ORDER BY 2","AD_Workflow", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); // all
KeyNamePair[] pp = DB.getKeyNamePairs(sql, true);
workflowList = ListboxFactory.newDropdownListbox();
@ -378,7 +384,7 @@ public class WFEditor extends ADForm {
addMenuItem(popupMenu, Msg.getMsg(Env.getCtx(), "Properties"), node, WFPopupItem.WFPOPUPITEM_PROPERTIES);
// Delete node
String title = Msg.getMsg(Env.getCtx(), "DeleteNode") +
": " + node.getName();
": " + node.getName(true);
addMenuItem(popupMenu, title, node, WFPopupItem.WFPOPUPITEM_DELETENODE);
}
MWFNode[] nodes = m_wf.getNodes(true, Env.getAD_Client_ID(Env.getCtx()));
@ -412,7 +418,7 @@ public class WFEditor extends ADForm {
if (!found)
{
String title = Msg.getMsg(Env.getCtx(), "AddLine")
+ ": " + node.getName() + " -> " + nn.getName();
+ ": " + node.getName(true) + " -> " + nn.getName(true);
addMenuItem(popupMenu, title, node, nn.getAD_WF_Node_ID());
}
}
@ -423,7 +429,7 @@ public class WFEditor extends ADForm {
continue;
MWFNode next = MWFNode.get(Env.getCtx(), line.getAD_WF_Next_ID());
String title = Msg.getMsg(Env.getCtx(), "DeleteLine")
+ ": " + node.getName() + " -> " + next.getName();
+ ": " + node.getName(true) + " -> " + next.getName(true);
addMenuItem(popupMenu, title, line);
}
popupMenu.setPage(target.getPage());

View File

@ -389,6 +389,7 @@ public class WAttachment extends Window implements EventListener<Event>
{
bSave.setEnabled(false);
bDelete.setEnabled(false);
sizeLabel.setText("");
return false;
}
}
@ -453,7 +454,7 @@ public class WAttachment extends Window implements EventListener<Event>
{
String fileName = null;
if (cbContent.getItemCount() > index)
if (index>=0 && cbContent.getItemCount() > index)
{
ListItem listitem = cbContent.getItemAtIndex(index);
fileName = (String)listitem.getValue();
@ -663,8 +664,11 @@ public class WAttachment extends Window implements EventListener<Event>
{
if (result)
{
if (m_attachment.deleteEntry(index))
if (m_attachment.deleteEntry(index)) {
cbContent.removeItemAt(index);
clearPreview();
autoPreview (cbContent.getSelectedIndex(), true);
}
m_change = true;
}

View File

@ -76,7 +76,7 @@ public class WFNodeWidget extends Widget {
}
if (image != null) {
imageWidget = new ImageWidget(scene, image);
imageWidget.setToolTipText(node.getName());
imageWidget.setToolTipText(node.getName(true));
addChild(imageWidget);
}
}
@ -97,7 +97,7 @@ public class WFNodeWidget extends Widget {
titleWidget.addChild (titleIcon);
}
String titleText = node.getName();
String titleText = node.getName(true);
if (titleText.length() > 20)
titleText = titleText.substring(0, 20) + "...";
LabelWidget titleTextWidget = new LabelWidget (scene, titleText);