IDEMPIERE-1376 Error message not translated in Validate Business Partner (#45)
This commit is contained in:
parent
1f3a83c96e
commit
4c22d862be
|
@ -0,0 +1,10 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-1376 Error message not translated in Validate Business Partner
|
||||||
|
-- May 9, 2020, 1:29:48 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','No Business Partner/Group selected',0,0,'Y',TO_DATE('2020-05-09 13:29:48','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-05-09 13:29:48','YYYY-MM-DD HH24:MI:SS'),100,200613,'BPartnerGroupNotSelected','D','83b41219-8ef2-4a58-87f0-bca896cdb8f8')
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('202005091335_IDEMPIERE-1376.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,10 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-1376 Error message not translated in Validate Business Partner
|
||||||
|
-- May 9, 2020, 1:29:48 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','No Business Partner/Group selected',0,0,'Y',TO_DATE('2020-05-09 13:29:48','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2020-05-09 13:29:48','YYYY-MM-DD HH24:MI:SS'),100,200613,'BPartnerGroupNotSelected','D','83b41219-8ef2-4a58-87f0-bca896cdb8f8')
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('202005091335_IDEMPIERE-1376.sql') FROM dual
|
||||||
|
;
|
|
@ -27,6 +27,7 @@ import org.compiere.model.MRole;
|
||||||
import org.compiere.model.MRoleOrgAccess;
|
import org.compiere.model.MRoleOrgAccess;
|
||||||
import org.compiere.model.MWarehouse;
|
import org.compiere.model.MWarehouse;
|
||||||
import org.compiere.util.AdempiereUserError;
|
import org.compiere.util.AdempiereUserError;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Link Business Partner to Organization.
|
* Link Business Partner to Organization.
|
||||||
|
@ -85,7 +86,7 @@ public class BPartnerOrgLink extends SvrProcess
|
||||||
throw new AdempiereUserError ("No Business Partner ID");
|
throw new AdempiereUserError ("No Business Partner ID");
|
||||||
MBPartner bp = new MBPartner (getCtx(), p_C_BPartner_ID, get_TrxName());
|
MBPartner bp = new MBPartner (getCtx(), p_C_BPartner_ID, get_TrxName());
|
||||||
if (bp.get_ID() == 0)
|
if (bp.get_ID() == 0)
|
||||||
throw new AdempiereUserError ("Business Partner not found - C_BPartner_ID=" + p_C_BPartner_ID);
|
throw new AdempiereUserError (Msg.getMsg(getCtx(), "BPartnerNotFound") + " - C_BPartner_ID=" + p_C_BPartner_ID);
|
||||||
// BP Location
|
// BP Location
|
||||||
MBPartnerLocation[] locs = bp.getLocations(false);
|
MBPartnerLocation[] locs = bp.getLocations(false);
|
||||||
if (locs == null || locs.length == 0)
|
if (locs == null || locs.length == 0)
|
||||||
|
|
|
@ -20,6 +20,8 @@ import java.math.BigDecimal;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.compiere.model.MBPartner;
|
import org.compiere.model.MBPartner;
|
||||||
|
import org.compiere.util.AdempiereUserError;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UnLink Business Partner from Organization
|
* UnLink Business Partner from Organization
|
||||||
|
@ -62,7 +64,7 @@ public class BPartnerOrgUnLink extends SvrProcess
|
||||||
throw new IllegalArgumentException ("No Business Partner ID");
|
throw new IllegalArgumentException ("No Business Partner ID");
|
||||||
MBPartner bp = new MBPartner (getCtx(), p_C_BPartner_ID, get_TrxName());
|
MBPartner bp = new MBPartner (getCtx(), p_C_BPartner_ID, get_TrxName());
|
||||||
if (bp.get_ID() == 0)
|
if (bp.get_ID() == 0)
|
||||||
throw new IllegalArgumentException ("Business Partner not found - C_BPartner_ID=" + p_C_BPartner_ID);
|
throw new AdempiereUserError (Msg.getMsg(getCtx(), "BPartnerNotFound") + " - C_BPartner_ID=" + p_C_BPartner_ID);
|
||||||
//
|
//
|
||||||
if (bp.getAD_OrgBP_ID() == 0)
|
if (bp.getAD_OrgBP_ID() == 0)
|
||||||
throw new IllegalArgumentException ("Business Partner not linked to an Organization");
|
throw new IllegalArgumentException ("Business Partner not linked to an Organization");
|
||||||
|
|
|
@ -74,13 +74,13 @@ public class BPartnerValidate extends SvrProcess
|
||||||
{
|
{
|
||||||
if (log.isLoggable(Level.INFO)) log.info("C_BPartner_ID=" + p_C_BPartner_ID + ", C_BP_Group_ID=" + p_C_BP_Group_ID);
|
if (log.isLoggable(Level.INFO)) log.info("C_BPartner_ID=" + p_C_BPartner_ID + ", C_BP_Group_ID=" + p_C_BP_Group_ID);
|
||||||
if (p_C_BPartner_ID == 0 && p_C_BP_Group_ID == 0)
|
if (p_C_BPartner_ID == 0 && p_C_BP_Group_ID == 0)
|
||||||
throw new AdempiereUserError ("No Business Partner/Group selected");
|
throw new AdempiereUserError (Msg.getMsg(getCtx(), "BPartnerGroupNotSelected"));
|
||||||
|
|
||||||
if (p_C_BP_Group_ID == 0)
|
if (p_C_BP_Group_ID == 0)
|
||||||
{
|
{
|
||||||
MBPartner bp = new MBPartner (getCtx(), p_C_BPartner_ID, get_TrxName());
|
MBPartner bp = new MBPartner (getCtx(), p_C_BPartner_ID, get_TrxName());
|
||||||
if (bp.get_ID() == 0)
|
if (bp.get_ID() == 0)
|
||||||
throw new AdempiereUserError ("Business Partner not found - C_BPartner_ID=" + p_C_BPartner_ID);
|
throw new AdempiereUserError (Msg.getMsg(getCtx(), "BPartnerNotFound") + " - C_BPartner_ID=" + p_C_BPartner_ID);
|
||||||
checkBP (bp);
|
checkBP (bp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue