Merge 81127bcc5271

This commit is contained in:
Heng Sin Low 2013-09-05 11:49:21 +08:00
commit a488b62f7f
16 changed files with 51 additions and 14 deletions

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Sep 4, 2013 2:23:31 PM COT
-- IDEMPIERE-1329 Images are being saved with EntityType=D
ALTER TABLE AD_Image MODIFY EntityType VARCHAR2(40) DEFAULT 'U'
;
-- Sep 4, 2013 2:23:32 PM COT
UPDATE AD_Image SET EntityType='U' WHERE EntityType IS NULL OR (EntityType='D' AND AD_Image_ID>=1000000)
;
SELECT register_migration_script('201309041432_IDEMPIERE-1329.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
-- Sep 4, 2013 2:23:31 PM COT
-- IDEMPIERE-1329 Images are being saved with EntityType=D
INSERT INTO t_alter_column values('ad_image','EntityType','VARCHAR(40)',null,'U')
;
-- Sep 4, 2013 2:23:32 PM COT
UPDATE AD_Image SET EntityType='U' WHERE EntityType IS NULL OR (EntityType='D' AND AD_Image_ID>=1000000)
;
SELECT register_migration_script('201309041432_IDEMPIERE-1329.sql') FROM dual
;

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

@ -2759,7 +2759,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
/** /**

View File

@ -219,7 +219,7 @@ public class WAttachment extends Window implements EventListener<Event>
this.setMaximizable(true); this.setMaximizable(true);
this.setWidth("700px"); this.setWidth("700px");
this.setHeight("85%"); this.setHeight("85%");
this.setTitle("Attachment"); this.setTitle(Msg.getMsg(Env.getCtx(), "Attachment"));
this.setClosable(true); this.setClosable(true);
this.setSizable(true); this.setSizable(true);
this.setBorder("normal"); this.setBorder("normal");

View File

@ -96,7 +96,7 @@ function Calc()
var value = calcText.value; var value = calcText.value;
if (separator != '.') if (separator != '.')
{ {
var re = new RegExp("[" + separator + "]"); var re = new RegExp("[" + separator + "]", "g");
value = value.replace(re,'.'); value = value.replace(re,'.');
} }
var result = "" + eval(value); var result = "" + eval(value);