IDEMPIERE-870 Fixed Assets using non-existant context variable (#1557)
* IDEMPIERE-870 Fixed Assets using non-existant context variable * - Implement context variable #IsCanApproveOwnDoc
This commit is contained in:
parent
3112ea87b5
commit
be7fb240cb
|
@ -0,0 +1,10 @@
|
|||
-- IDEMPIERE-870
|
||||
SELECT register_migration_script('202211112147_IDEMPIERE-870.sql') FROM dual;
|
||||
|
||||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Nov 11, 2022, 9:48:36 PM CET
|
||||
UPDATE AD_Column SET DefaultValue='@$C_Currency_ID@',Updated=TO_TIMESTAMP('2022-11-11 21:48:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55548
|
||||
;
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
-- IDEMPIERE-870
|
||||
SELECT register_migration_script('202211112147_IDEMPIERE-870.sql') FROM dual;
|
||||
|
||||
-- Nov 11, 2022, 9:48:36 PM CET
|
||||
UPDATE AD_Column SET DefaultValue='@$C_Currency_ID@',Updated=TO_TIMESTAMP('2022-11-11 21:48:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55548
|
||||
;
|
||||
|
|
@ -436,9 +436,8 @@ public class MAssetAddition extends X_A_Asset_Addition
|
|||
{
|
||||
if(!isProcessed())
|
||||
{
|
||||
String str = Env.getContext(getCtx(), "#IsCanApproveOwnDoc");
|
||||
boolean isApproved = "Y".equals(str); //ARHIPAC.toBoolean(str, false);
|
||||
if (log.isLoggable(Level.FINE)) log.fine("#IsCanApproveOwnDoc=" + str + "=" + isApproved);
|
||||
boolean isApproved = MRole.getDefault().isCanApproveOwnDoc();
|
||||
if (log.isLoggable(Level.FINE)) log.fine("IsCanApproveOwnDoc=" + isApproved);
|
||||
setIsApproved(isApproved);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,6 +113,7 @@ public final class Env
|
|||
public static final String DB_TYPE = "#DBType";
|
||||
public static final String GL_CATEGORY_ID = "#GL_Category_ID";
|
||||
public static final String HAS_ALIAS = "$HasAlias";
|
||||
public static final String IS_CAN_APPROVE_OWN_DOC = "#IsCanApproveOwnDoc";
|
||||
public static final String IS_CLIENT_ADMIN = "#IsClientAdmin";
|
||||
/** Context Language identifier */
|
||||
public static final String LANGUAGE = "#AD_Language";
|
||||
|
|
|
@ -326,6 +326,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
|
|||
localHttpAddr.append(":").append(port);
|
||||
}
|
||||
Env.setContext(ctx, Env.LOCAL_HTTP_ADDRESS, localHttpAddr.toString());
|
||||
Env.setContext(ctx, Env.IS_CAN_APPROVE_OWN_DOC, MRole.getDefault().isCanApproveOwnDoc());
|
||||
Clients.response(new AuScript("zAu.cmd0.clearBusy()"));
|
||||
|
||||
//init favorite
|
||||
|
|
Loading…
Reference in New Issue