IDEMPIERE-1314 getDocumentInfo methods should return translated String (Based on patch from Nicolas Micoud)

This commit is contained in:
Carlos Ruiz 2013-09-04 19:34:46 -05:00
parent f632c150f9
commit be08ddbc05
12 changed files with 22 additions and 12 deletions

View File

@ -41,7 +41,7 @@ public class MDocType extends X_C_DocType
/** /**
* *
*/ */
private static final long serialVersionUID = 2641885482012907072L; private static final long serialVersionUID = -6556521509479670059L;
/** /**
* Return the first Doc Type for this BaseType * Return the first Doc Type for this BaseType
@ -357,4 +357,14 @@ public class MDocType extends X_C_DocType
return relatedDocTypeId; return relatedDocTypeId;
} }
/**
* Get translated doctype name
* @return Name if available translated
*/
public String getNameTrl()
{
return get_Translation (COLUMNNAME_Name, Env.getAD_Language(getCtx()));
} // getNameTrl
} // MDocType } // MDocType

View File

@ -591,7 +591,7 @@ public class MInOut extends X_M_InOut implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo());
return msgreturn.toString(); return msgreturn.toString();
} // getDocumentInfo } // getDocumentInfo

View File

@ -204,7 +204,7 @@ public class MInventory extends X_M_Inventory implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo());
return msgreturn.toString(); return msgreturn.toString();
} // getDocumentInfo } // getDocumentInfo

View File

@ -1043,7 +1043,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo());
return msgreturn.toString(); return msgreturn.toString();
} // getDocumentInfo } // getDocumentInfo

View File

@ -887,7 +887,7 @@ public class MJournal extends X_GL_Journal implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo());
return msgreturn.toString(); return msgreturn.toString();
} // getDocumentInfo } // getDocumentInfo

View File

@ -808,7 +808,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(" ").append(getDocumentNo()); StringBuilder msgreturn = new StringBuilder().append(dt.getNameTrl()).append(" ").append(getDocumentNo());
return msgreturn.toString(); return msgreturn.toString();
} // getDocumentInfo } // getDocumentInfo

View File

@ -153,7 +153,7 @@ public class MMovement extends X_M_Movement implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
return dt.getName() + " " + getDocumentNo(); return dt.getNameTrl() + " " + getDocumentNo();
} // getDocumentInfo } // getDocumentInfo
/** /**

View File

@ -589,7 +589,7 @@ public class MOrder extends X_C_Order implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID() > 0 ? getC_DocType_ID() : getC_DocTypeTarget_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID() > 0 ? getC_DocType_ID() : getC_DocTypeTarget_ID());
return dt.getName() + " " + getDocumentNo(); return dt.getNameTrl() + " " + getDocumentNo();
} // getDocumentInfo } // getDocumentInfo
/** /**

View File

@ -2750,7 +2750,7 @@ public final class MPayment extends X_C_Payment
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
return dt.getName() + " " + getDocumentNo(); return dt.getNameTrl() + " " + getDocumentNo();
} // getDocumentInfo } // getDocumentInfo
/** /**

View File

@ -203,7 +203,7 @@ public class MRMA extends X_M_RMA implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
return dt.getName() + " " + getDocumentNo(); return dt.getNameTrl() + " " + getDocumentNo();
} // getDocumentInfo } // getDocumentInfo
/** /**

View File

@ -70,7 +70,7 @@ public class DocActionTemplate extends PO implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), 0); MDocType dt = MDocType.get(getCtx(), 0);
return dt.getName() + " " + getDocumentNo(); return dt.getNameTrl() + " " + getDocumentNo();
} // getDocumentInfo } // getDocumentInfo
/** /**

View File

@ -387,7 +387,7 @@ public class MDDOrder extends X_DD_Order implements DocAction
public String getDocumentInfo() public String getDocumentInfo()
{ {
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
return dt.getName() + " " + getDocumentNo(); return dt.getNameTrl() + " " + getDocumentNo();
} // getDocumentInfo } // getDocumentInfo
/** /**