1006008 Add field type for dashboard content. (IDEMPIERE-3270)

This commit is contained in:
Heng Sin Low 2016-05-23 21:11:38 +08:00
parent 979d022418
commit 146af78c05
5 changed files with 182 additions and 2 deletions

View File

@ -0,0 +1,72 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- May 23, 2016 6:17:30 PM MYT
-- 1006008 Add field type for dashboard content
INSERT INTO AD_Column (AD_Column_ID,SeqNoSelection,IsSyncDatabase,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,Updated,IsUpdateable,ColumnName,Name,IsAllowCopy,IsActive,CreatedBy,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,AD_Org_ID,Created,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (212763,0,'N',0,'N','N','N',0,'N',22,'N','N','N','Y','84c773d0-4cdf-45e0-a0cd-0ce63907e53d',TO_DATE('2016-05-23 18:17:24','YYYY-MM-DD HH24:MI:SS'),'N','PA_DashboardContent_ID','Dashboard Content','Y','Y',100,100,'N','N',0,0,TO_DATE('2016-05-23 18:17:24','YYYY-MM-DD HH24:MI:SS'),'U','N','N','N',51006,19,464)
;
-- May 23, 2016 6:25:24 PM MYT
UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2016-05-23 18:25:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
;
-- May 23, 2016 6:28:36 PM MYT
INSERT INTO AD_Field (SortNo,AD_Field_ID,IsEncrypted,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,IsReadOnly,DisplayLogic,AD_Org_ID,Updated,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,CreatedBy,UpdatedBy,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,Created,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,AD_Tab_ID) VALUES (0,204221,'N',0,'N','N',300,'Y','N','@AD_Reference_ID@=200122',0,TO_DATE('2016-05-23 18:28:29','YYYY-MM-DD HH24:MI:SS'),'Dashboard Content','f6d15a90-273e-4810-866d-6a1842a23c32','Y','N',100,100,'Y','Y',280,1,'N',0,TO_DATE('2016-05-23 18:28:29','YYYY-MM-DD HH24:MI:SS'),1,1,'N','N',212763,'D',395)
;
-- May 23, 2016 6:29:09 PM MYT
UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2016-05-23 18:29:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204221
;
-- May 23, 2016 6:29:31 PM MYT
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=204221
;
-- May 23, 2016 6:29:31 PM MYT
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=5054
;
-- May 23, 2016 6:29:31 PM MYT
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=200849
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=200851
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=200852
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=200854
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=5051
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=5057
;
-- May 23, 2016 8:25:15 PM MYT
-- 1006008 Add field type for dashboard content
UPDATE AD_Column SET FKConstraintType='N', FKConstraintName='PADashboardContent_ADUserDefFi',Updated=TO_DATE('2016-05-23 20:25:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
;
-- May 23, 2016 8:25:15 PM MYT
ALTER TABLE AD_UserDef_Field ADD PA_DashboardContent_ID NUMBER(10) DEFAULT NULL
;
-- May 23, 2016 8:25:16 PM MYT
ALTER TABLE AD_UserDef_Field ADD CONSTRAINT PADashboardContent_ADUserDefFi FOREIGN KEY (PA_DashboardContent_ID) REFERENCES pa_dashboardcontent(pa_dashboardcontent_id) DEFERRABLE INITIALLY DEFERRED
;
-- May 23, 2016 8:49:33 PM MYT
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_DATE('2016-05-23 20:49:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
;
SELECT register_migration_script('201605231800_Ticket_1006008') FROM dual
;

View File

@ -0,0 +1,69 @@
-- May 23, 2016 6:17:30 PM MYT
-- 1006008 Add field type for dashboard content
INSERT INTO AD_Column (AD_Column_ID,SeqNoSelection,IsSyncDatabase,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,Updated,IsUpdateable,ColumnName,Name,IsAllowCopy,IsActive,CreatedBy,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,AD_Org_ID,Created,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (212763,0,'N',0,'N','N','N',0,'N',22,'N','N','N','Y','84c773d0-4cdf-45e0-a0cd-0ce63907e53d',TO_TIMESTAMP('2016-05-23 18:17:24','YYYY-MM-DD HH24:MI:SS'),'N','PA_DashboardContent_ID','Dashboard Content','Y','Y',100,100,'N','N',0,0,TO_TIMESTAMP('2016-05-23 18:17:24','YYYY-MM-DD HH24:MI:SS'),'U','N','N','N',51006,19,464)
;
-- May 23, 2016 6:25:24 PM MYT
UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2016-05-23 18:25:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
;
-- May 23, 2016 6:28:36 PM MYT
INSERT INTO AD_Field (SortNo,AD_Field_ID,IsEncrypted,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,IsReadOnly,DisplayLogic,AD_Org_ID,Updated,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,CreatedBy,UpdatedBy,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,Created,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,AD_Tab_ID) VALUES (0,204221,'N',0,'N','N',300,'Y','N','@AD_Reference_ID@=200122',0,TO_TIMESTAMP('2016-05-23 18:28:29','YYYY-MM-DD HH24:MI:SS'),'Dashboard Content','f6d15a90-273e-4810-866d-6a1842a23c32','Y','N',100,100,'Y','Y',280,1,'N',0,TO_TIMESTAMP('2016-05-23 18:28:29','YYYY-MM-DD HH24:MI:SS'),1,1,'N','N',212763,'D',395)
;
-- May 23, 2016 6:29:09 PM MYT
UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2016-05-23 18:29:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204221
;
-- May 23, 2016 6:29:31 PM MYT
UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=204221
;
-- May 23, 2016 6:29:31 PM MYT
UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=5054
;
-- May 23, 2016 6:29:31 PM MYT
UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=200849
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=200851
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=200852
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=200854
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=5051
;
-- May 23, 2016 6:29:32 PM MYT
UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=5057
;
-- May 23, 2016 8:25:15 PM MYT
-- 1006008 Add field type for dashboard content
UPDATE AD_Column SET FKConstraintType='N', FKConstraintName='PADashboardContent_ADUserDefFi',Updated=TO_TIMESTAMP('2016-05-23 20:25:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
;
-- May 23, 2016 8:25:15 PM MYT
ALTER TABLE AD_UserDef_Field ADD COLUMN PA_DashboardContent_ID NUMERIC(10) DEFAULT NULL
;
-- May 23, 2016 8:25:16 PM MYT
ALTER TABLE AD_UserDef_Field ADD CONSTRAINT PADashboardContent_ADUserDefFi FOREIGN KEY (PA_DashboardContent_ID) REFERENCES pa_dashboardcontent(pa_dashboardcontent_id) DEFERRABLE INITIALLY DEFERRED
;
-- May 23, 2016 8:49:33 PM MYT
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2016-05-23 20:49:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=212763
;
SELECT register_migration_script('201605231800_Ticket_1006008') FROM dual
;

View File

@ -318,6 +318,9 @@ public class GridFieldVO implements Serializable
if (userDef.getAD_FieldStyle_ID() > 0) if (userDef.getAD_FieldStyle_ID() > 0)
vo.AD_FieldStyle_ID = userDef.getAD_FieldStyle_ID(); vo.AD_FieldStyle_ID = userDef.getAD_FieldStyle_ID();
if (userDef.getPA_DashboardContent_ID() > 0)
vo.PA_DashboardContent_ID = userDef.getPA_DashboardContent_ID();
} }
} }
// //

View File

@ -416,6 +416,17 @@ public interface I_AD_UserDef_Field
*/ */
public int getNumLines(); public int getNumLines();
/** Column name PA_DashboardContent_ID */
public static final String COLUMNNAME_PA_DashboardContent_ID = "PA_DashboardContent_ID";
/** Set Dashboard Content */
public void setPA_DashboardContent_ID (int PA_DashboardContent_ID);
/** Get Dashboard Content */
public int getPA_DashboardContent_ID();
public org.compiere.model.I_PA_DashboardContent getPA_DashboardContent() throws RuntimeException;
/** Column name ReadOnlyLogic */ /** Column name ReadOnlyLogic */
public static final String COLUMNNAME_ReadOnlyLogic = "ReadOnlyLogic"; public static final String COLUMNNAME_ReadOnlyLogic = "ReadOnlyLogic";

View File

@ -30,7 +30,7 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers
/** /**
* *
*/ */
private static final long serialVersionUID = 20161030L; private static final long serialVersionUID = 20161215L;
/** Standard Constructor */ /** Standard Constructor */
public X_AD_UserDef_Field (Properties ctx, int AD_UserDef_Field_ID, String trxName) public X_AD_UserDef_Field (Properties ctx, int AD_UserDef_Field_ID, String trxName)
@ -638,6 +638,31 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers
return ii.intValue(); return ii.intValue();
} }
public org.compiere.model.I_PA_DashboardContent getPA_DashboardContent() throws RuntimeException
{
return (org.compiere.model.I_PA_DashboardContent)MTable.get(getCtx(), org.compiere.model.I_PA_DashboardContent.Table_Name)
.getPO(getPA_DashboardContent_ID(), get_TrxName()); }
/** Set Dashboard Content.
@param PA_DashboardContent_ID Dashboard Content */
public void setPA_DashboardContent_ID (int PA_DashboardContent_ID)
{
if (PA_DashboardContent_ID < 1)
set_Value (COLUMNNAME_PA_DashboardContent_ID, null);
else
set_Value (COLUMNNAME_PA_DashboardContent_ID, Integer.valueOf(PA_DashboardContent_ID));
}
/** Get Dashboard Content.
@return Dashboard Content */
public int getPA_DashboardContent_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PA_DashboardContent_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Read Only Logic. /** Set Read Only Logic.
@param ReadOnlyLogic @param ReadOnlyLogic
Logic to determine if field is read only (applies only when field is read-write) Logic to determine if field is read only (applies only when field is read-write)