Merge with development
This commit is contained in:
commit
8a3e57fbea
|
@ -362,7 +362,13 @@ public class MClient extends X_AD_Client
|
|||
success = tree.save();
|
||||
AD_Tree_Activity_ID = tree.getAD_Tree_ID();
|
||||
}
|
||||
else if (value.equals(X_AD_Tree.TREETYPE_Menu)) // No Menu
|
||||
else if ( value.equals(X_AD_Tree.TREETYPE_Menu) // No Menu
|
||||
|| value.equals(X_AD_Tree.TREETYPE_Table) // No Custom Table
|
||||
|| value.equals(X_AD_Tree.TREETYPE_User1) // No custom user trees
|
||||
|| value.equals(X_AD_Tree.TREETYPE_User2)
|
||||
|| value.equals(X_AD_Tree.TREETYPE_User3)
|
||||
|| value.equals(X_AD_Tree.TREETYPE_User4)
|
||||
)
|
||||
success = true;
|
||||
else // PC (Product Category), BB (BOM)
|
||||
{
|
||||
|
|
|
@ -4705,7 +4705,7 @@ public abstract class PO
|
|||
}
|
||||
|
||||
private void checkValidContext() {
|
||||
if (getCtx().size() == 0)
|
||||
if (getCtx().isEmpty() && getCtx().getProperty("#AD_Client_ID") == null)
|
||||
throw new AdempiereException("Context lost");
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<echo message="${equinox.launcher.jar}"/>
|
||||
<echo message="${repository}"/>
|
||||
<echo message="${destination}"/>
|
||||
<java jar="${equinox.launcher.jar}" fork="true" failonerror="true" >
|
||||
<java outputproperty="javaoutput" resultproperty="javaresult" jar="${equinox.launcher.jar}" fork="true" failonerror="false" >
|
||||
<arg value="-application"/>
|
||||
<arg value="org.eclipse.equinox.p2.director"/>
|
||||
<arg value="-repository"/>
|
||||
|
@ -43,5 +43,16 @@
|
|||
<arg value="-roaming"/>
|
||||
<!-- jvmarg value="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y"/ -->
|
||||
</java>
|
||||
<!-- IDEMPIERE-1618: This block gives an error message on console. Else errors here are hard
|
||||
to identify for unexperienced users because the java runs in a fork and gives no output to
|
||||
stdout. Messages are still in the latest logfile in ECLIPSE_HOME/configuration
|
||||
(or buckminster) - thanks to CarlosRuiz for this hint.
|
||||
-->
|
||||
<echo message="${javaresult}" />
|
||||
<fail message="result: ${javaresult}\n${javaoutput}">
|
||||
<condition>
|
||||
<not><equals arg1="${javaresult}" arg2="0"/></not>
|
||||
</condition>
|
||||
</fail>
|
||||
</target>
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<echo message="${equinox.launcher.jar}"/>
|
||||
<echo message="${repository}"/>
|
||||
<echo message="${destination}"/>
|
||||
<java jar="${equinox.launcher.jar}" fork="true" failonerror="true" >
|
||||
<java outputproperty="javaoutput" resultproperty="javaresult" jar="${equinox.launcher.jar}" fork="true" failonerror="false" >
|
||||
<arg value="-application"/>
|
||||
<arg value="org.eclipse.equinox.p2.director"/>
|
||||
<arg value="-repository"/>
|
||||
|
@ -43,5 +43,16 @@
|
|||
<arg value="-roaming"/>
|
||||
<!-- jvmarg value="-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y"/ -->
|
||||
</java>
|
||||
<!-- IDEMPIERE-1618: This block gives an error message on console. Else errors here are hard
|
||||
to identify for unexperienced users because the java runs in a fork and gives no output to
|
||||
stdout. Messages are still in the latest logfile in ECLIPSE_HOME/configuration
|
||||
(or buckminster) - thanks to CarlosRuiz for this hint.
|
||||
-->
|
||||
<echo message="${javaresult}" />
|
||||
<fail message="result: ${javaresult}\n${javaoutput}">
|
||||
<condition>
|
||||
<not><equals arg1="${javaresult}" arg2="0"/></not>
|
||||
</condition>
|
||||
</fail>
|
||||
</target>
|
||||
</project>
|
|
@ -39,8 +39,6 @@ public class CompiereService {
|
|||
|
||||
private static CLogger log = CLogger.getCLogger(CompiereService.class);
|
||||
|
||||
private Properties m_ctx;
|
||||
|
||||
private int m_AD_Client_ID;
|
||||
private int m_AD_Org_ID;
|
||||
private int m_AD_User_ID;
|
||||
|
@ -92,7 +90,7 @@ public class CompiereService {
|
|||
* @return context of current request
|
||||
*/
|
||||
public Properties getCtx() {
|
||||
return m_ctx;
|
||||
return Env.getCtx();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -113,11 +111,10 @@ public class CompiereService {
|
|||
{
|
||||
CompiereUtil.initWeb();
|
||||
|
||||
m_ctx = new Properties();
|
||||
m_connected = true;
|
||||
|
||||
ServerContext.setCurrentInstance(m_ctx);
|
||||
Env.setContext( m_ctx, "#AD_Language", "en_US" );
|
||||
ServerContext.setCurrentInstance(new Properties());
|
||||
Env.setContext(getCtx(), "#AD_Language", "en_US" );
|
||||
m_language = Language.getLanguage("en_US");
|
||||
|
||||
dateFormat = DisplayType.getDateFormat(DisplayType.Date, m_language);
|
||||
|
@ -138,7 +135,6 @@ public class CompiereService {
|
|||
{
|
||||
Env.logout();
|
||||
ServerContext.dispose();
|
||||
m_ctx = null;
|
||||
m_loggedin = false;
|
||||
m_connected = false;
|
||||
}
|
||||
|
@ -255,7 +251,7 @@ public class CompiereService {
|
|||
m_locale = Lang;
|
||||
m_userName = MUser.getNameOfUser(m_AD_User_ID);
|
||||
|
||||
Env.setContext( m_ctx, "#AD_Language", Lang);
|
||||
Env.setContext( getCtx(), "#AD_Language", Lang);
|
||||
m_language = Language.getLanguage(Lang);
|
||||
Env.verifyLanguage( getCtx(), m_language );
|
||||
|
||||
|
@ -274,7 +270,7 @@ public class CompiereService {
|
|||
if (log.isLoggable(Level.INFO)) log.info(" #Date = "+ Env.getContextAsDate( getCtx(), "#Date"));
|
||||
|
||||
Env.setContext( getCtx(), "#M_Warehouse_ID", M_Warehouse_ID );
|
||||
Env.setContext(m_ctx, Env.LANGUAGE, m_language.getAD_Language());
|
||||
Env.setContext(getCtx(), Env.LANGUAGE, m_language.getAD_Language());
|
||||
|
||||
// Create session
|
||||
MSession session = MSession.get (getCtx(), false);
|
||||
|
|
Loading…
Reference in New Issue