diff --git a/migration/i2.0z/oracle/201405271604_IDEMPIERE-1878.sql b/migration/i2.0z/oracle/201405271604_IDEMPIERE-1878.sql new file mode 100644 index 0000000000..bcd0f89124 --- /dev/null +++ b/migration/i2.0z/oracle/201405271604_IDEMPIERE-1878.sql @@ -0,0 +1,179 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- May 27, 2014 10:33:16 PM ICT +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +UPDATE AD_Column SET IsSyncDatabase='Y', IsTranslated='Y', ColumnName='Name', AD_Org_ID=0, AD_Client_ID=0,Updated=TO_DATE('2014-05-27 22:33:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7019 +; + +-- May 27, 2014 10:33:17 PM ICT +UPDATE AD_Column SET IsSyncDatabase='Y', IsTranslated='Y', ColumnName='Description', AD_Org_ID=0, AD_Client_ID=0,Updated=TO_DATE('2014-05-27 22:33:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7025 +; + +-- May 27, 2014 10:33:23 PM ICT +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Window_ID,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Processing,AD_Client_ID,Created) VALUES ('N','6',70,240,200130,'N','N','Y','D','L','f6afaadd-dc3a-4b1e-ac86-cf4f562e6dc3','Y','N','AD_PrintFormat_Trl','Data Print Format','Print Format Trl','Y',0,100,TO_DATE('2014-05-27 22:33:17','YYYY-MM-DD HH24:MI:SS'),100,'N',0,TO_DATE('2014-05-27 22:33:17','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:24 PM ICT +INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,IncrementNo,AD_Sequence_UU,AD_Org_ID,CreatedBy,Updated,UpdatedBy,IsActive,StartNo,AD_Client_ID,Created) VALUES ('N',200000,'Y',1000000,'N','Y',200177,'Table AD_PrintFormat_Trl','AD_PrintFormat_Trl',1,'5140cb57-062d-4516-b167-62a9086f6eb7',0,100,TO_DATE('2014-05-27 22:33:23','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000000,0,TO_DATE('2014-05-27 22:33:23','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:25 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211259,'Y','N','N','Y',10,'N','N','N','Y','f9ac04a4-8316-444b-9498-a21ae57ff33d','N','AD_PrintFormat_ID','Data Print Format','0','The print format determines how data is rendered for print.','Print Format','Y',TO_DATE('2014-05-27 22:33:24','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:24','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','adprintformat_trl','N',1790,19,200130) +; + +-- May 27, 2014 10:33:25 PM ICT +CREATE TABLE AD_PrintFormat_Trl (AD_PrintFormat_ID NUMBER(10) DEFAULT 0 NOT NULL, CONSTRAINT AD_PrintFormat_Trl_Key PRIMARY KEY (AD_PrintFormat_ID)) +; + +-- May 27, 2014 10:33:27 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211260,'Y','N','N','Y',6,'N','N','N','Y','eff27d6a-7790-487d-829d-cfa56eacb0f8','N','AD_Language','Language for this entity','The Language identifies the language to use for display and formatting','Language','Y',TO_DATE('2014-05-27 22:33:26','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:26','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','adlanguage_adprintformtrl','N',109,18,106,200130) +; + +-- May 27, 2014 10:33:27 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD AD_Language VARCHAR2(6) NOT NULL +; + +-- May 27, 2014 10:33:27 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID) VALUES ('Y',0.0,211261,'Y','N','N','N',10,'N','N','N','Y','7a497225-b391-4ed3-9521-c987218f4b1f','N','AD_Client_ID','Client/Tenant for this installation.','@#AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',TO_DATE('2014-05-27 22:33:27','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:27','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',102,19,200130,129) +; + +-- May 27, 2014 10:33:27 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD AD_Client_ID NUMBER(10) NOT NULL +; + +-- May 27, 2014 10:33:28 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID) VALUES ('Y',0.0,211262,'Y','N','N','N',10,'N','N','N','Y','61e40f14-4e0f-43f3-a43d-e5381e6a19f0','N','AD_Org_ID','Organizational entity within client','@#AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',TO_DATE('2014-05-27 22:33:27','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:27','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',113,19,200130,104) +; + +-- May 27, 2014 10:33:28 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD AD_Org_ID NUMBER(10) NOT NULL +; + +-- May 27, 2014 10:33:29 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211263,'Y','N','N','N',1,'N','N','N','Y','dc9ebff5-1a13-4978-bd6d-8a576a96db1f','Y','IsActive','The record is active in the system','Y','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Active','N',TO_DATE('2014-05-27 22:33:28','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:28','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',348,20,200130) +; + +-- May 27, 2014 10:33:29 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL +; + +-- May 27, 2014 10:33:30 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211264,'Y','N','N','N',29,'N','N','N','Y','b5c86f41-f3f3-449c-b8de-15c6185b00ee','N','Created','Date this record was created','SYSDATE','The Created field indicates the date that this record was created.','Created','N',TO_DATE('2014-05-27 22:33:29','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:29','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',245,16,200130) +; + +-- May 27, 2014 10:33:30 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD Created DATE DEFAULT SYSDATE NOT NULL +; + +-- May 27, 2014 10:33:31 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211265,'Y','N','N','N',10,'N','N','N','Y','a7c8903f-1993-46e6-90c8-e26bb3c28559','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',TO_DATE('2014-05-27 22:33:30','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:30','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',246,18,110,200130) +; + +-- May 27, 2014 10:33:31 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD CreatedBy NUMBER(10) NOT NULL +; + +-- May 27, 2014 10:33:32 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211266,'Y','N','N','N',29,'N','N','N','Y','0ff1758a-763b-4ea9-9d6e-552aff285f9a','N','Updated','Date this record was updated','SYSDATE','The Updated field indicates the date that this record was updated.','Updated','N',TO_DATE('2014-05-27 22:33:31','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:31','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',607,16,200130) +; + +-- May 27, 2014 10:33:32 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD Updated DATE DEFAULT SYSDATE NOT NULL +; + +-- May 27, 2014 10:33:33 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211267,'Y','N','N','N',10,'N','N','N','Y','f6635c5b-d08e-4c11-91e8-e174ab9a6443','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',TO_DATE('2014-05-27 22:33:32','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:32','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',608,18,110,200130) +; + +-- May 27, 2014 10:33:33 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD UpdatedBy NUMBER(10) NOT NULL +; + +-- May 27, 2014 10:33:34 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211268,'Y','N','Y','N',60,'Y','N','N','Y','2063175c-cd06-44d2-9a98-7864dfb763df','Y','Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Name','Y',TO_DATE('2014-05-27 22:33:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',469,10,200130) +; + +-- May 27, 2014 10:33:34 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD Name VARCHAR2(60) NOT NULL +; + +-- May 27, 2014 10:33:34 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211269,'N','N','N','N',255,'Y','N','N','Y','02dab09d-1d15-4698-b729-ec756656a1f4','Y','Description','Optional short description of the record','A description is limited to 255 characters.','Description','Y',TO_DATE('2014-05-27 22:33:34','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:34','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',275,10,200130) +; + +-- May 27, 2014 10:33:35 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD Description VARCHAR2(255) DEFAULT NULL +; + +-- May 27, 2014 10:33:35 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211270,'Y','N','N','N',1,'N','N','N','Y','a2912e1e-48ee-4389-acb8-52d64e5c0698','Y','IsTranslated','This column is translated','The Translated checkbox indicates if this column is translated.','Translated','Y',TO_DATE('2014-05-27 22:33:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',420,20,200130) +; + +-- May 27, 2014 10:33:35 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD IsTranslated CHAR(1) CHECK (IsTranslated IN ('Y','N')) NOT NULL +; + +-- May 27, 2014 10:33:36 PM ICT +INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType,Created,Updated) VALUES ('AD_PrintFormat_Trl_UU',202715,'AD_PrintFormat_Trl_UU','AD_PrintFormat_Trl_UU','ae168f8a-94f1-4327-ba4e-38c92616dc34',0,100,100,'Y',0,'D',TO_DATE('2014-05-27 22:33:36','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2014-05-27 22:33:36','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:37 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211271,'N','N','N','N',36,'N','N','N','Y','8919e165-e58c-4c5c-8a57-fa21c0391dff','N','AD_PrintFormat_Trl_UU','AD_PrintFormat_Trl_UU','N',TO_DATE('2014-05-27 22:33:36','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-27 22:33:36','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',202715,10,200130) +; + +-- May 27, 2014 10:33:37 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD AD_PrintFormat_Trl_UU VARCHAR2(36) DEFAULT NULL +; + +-- May 27, 2014 10:33:37 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD CONSTRAINT AD_PrintFormat_Trl_UU_idx UNIQUE (AD_PrintFormat_Trl_UU) +; + +-- May 27, 2014 10:33:38 PM ICT +INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,AD_Tab_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Column_ID,AD_Table_ID,AD_Client_ID,TreeDisplayedOn) VALUES ('N','N','Y',240,70,'Y','N','N','N','N','Y','N',1,'3c39505a-e38d-495d-aa7e-ce50e02e4208','D','Translate',200143,0,TO_DATE('2014-05-27 22:33:37','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2014-05-27 22:33:37','YYYY-MM-DD HH24:MI:SS'),100,'Y',211259,200130,0,'B') +; + +-- May 27, 2014 10:33:39 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,36,'N','N',0,'Y',203039,'N','AD_PrintFormat_Trl_UU','abb5adb7-ba95-4027-9d7c-264ad30d77d3','N','N',100,0,100,TO_DATE('2014-05-27 22:33:38','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N','N',211271,'D',TO_DATE('2014-05-27 22:33:38','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:40 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,10,'N','N',10,'Y',203040,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client/Tenant for this installation.','Client','d35d06cd-dfb8-47a2-b819-71cd095cbf1a','Y','N',100,0,100,TO_DATE('2014-05-27 22:33:39','YYYY-MM-DD HH24:MI:SS'),'Y','Y',10,1,'N',0,2,1,'N','N',211261,'D',TO_DATE('2014-05-27 22:33:39','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:41 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,IsAllowCopy,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,10,'N','N',20,'Y',203041,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organizational entity within client','Organization','a47b16bb-15c7-44cc-a6b0-a522e810a677','Y','N','Y',100,0,100,TO_DATE('2014-05-27 22:33:40','YYYY-MM-DD HH24:MI:SS'),'Y','N',4,'N',0,2,1,'N','N',211262,'D',TO_DATE('2014-05-27 22:33:40','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:42 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,10,'N','N',30,'Y',203042,'N','The print format determines how data is rendered for print.','Data Print Format','Print Format','d77ffb69-faae-4d58-a018-620c84392609','Y','N',100,0,100,TO_DATE('2014-05-27 22:33:41','YYYY-MM-DD HH24:MI:SS'),'Y','Y',40,1,'N',0,2,1,'N','N',211259,'D',TO_DATE('2014-05-27 22:33:41','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:43 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,6,'N','N',40,'Y',203043,'N','The Language identifies the language to use for display and formatting','Language for this entity','Language','3fe13437-7fd4-4d30-a8f8-7443805ee8c2','Y','N',100,0,100,TO_DATE('2014-05-27 22:33:42','YYYY-MM-DD HH24:MI:SS'),'Y','Y',50,1,'N',0,2,1,'N','N',211260,'D',TO_DATE('2014-05-27 22:33:42','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:44 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,60,'N','N',50,'Y',203044,'N','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Alphanumeric identifier of the entity','Name','5ac3896d-d640-471d-b429-9194266e11ee','Y','N',100,0,100,TO_DATE('2014-05-27 22:33:43','YYYY-MM-DD HH24:MI:SS'),'Y','Y',20,1,'N',0,5,1,'N','N',211268,'D',TO_DATE('2014-05-27 22:33:43','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:45 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,255,'N','N',60,'Y',203045,'N','A description is limited to 255 characters.','Optional short description of the record','Description','b4f2d4ad-29d6-4dc8-af15-6156c4bd392e','Y','N',100,0,100,TO_DATE('2014-05-27 22:33:44','YYYY-MM-DD HH24:MI:SS'),'Y','Y',30,1,'N',0,5,1,'N','N',211269,'D',TO_DATE('2014-05-27 22:33:44','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:45 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,1,'N','N',70,'Y',203046,'N','The Translated checkbox indicates if this column is translated.','This column is translated','Translated','3fd4e7d7-ce58-4eae-afc4-daec3090e45b','Y','N',100,0,100,TO_DATE('2014-05-27 22:33:45','YYYY-MM-DD HH24:MI:SS'),'Y','Y',60,2,'N',0,2,1,'N','N',211270,'D',TO_DATE('2014-05-27 22:33:45','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:46 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,1,'N','N',80,'Y',203047,'N','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','The record is active in the system','Active','518eb2fb-6cb8-4963-89d5-2bf0268ba49f','Y','N',100,0,100,TO_DATE('2014-05-27 22:33:45','YYYY-MM-DD HH24:MI:SS'),'Y','Y',70,5,'N',0,2,1,'N','N',211263,'D',TO_DATE('2014-05-27 22:33:45','YYYY-MM-DD HH24:MI:SS')) +; +SELECT register_migration_script('201405271604_IDEMPIERE-1878.sql') FROM dual +; diff --git a/migration/i2.0z/oracle/201405291604_IDEMPIERE-1792.sql b/migration/i2.0z/oracle/201405291604_IDEMPIERE-1792.sql new file mode 100644 index 0000000000..958fb4831d --- /dev/null +++ b/migration/i2.0z/oracle/201405291604_IDEMPIERE-1792.sql @@ -0,0 +1,45 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- May 29, 2014 2:05:43 PM ICT +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (0,'N',0,211272,'N','N','N',0,'N',2000,'N','N','N','Y','1a19bfbb-e413-4e31-b635-a40068f21a0d','Y','DefaultValue','Default value hierarchy, separated by ;','The defaults are evaluated in the order of definition, the first not null value becomes the default value of the column. The values are separated by comma or semicolon. a) Literals:. ''Text'' or 123 b) Variables - in format @Variable@ - Login e.g. #Date, #AD_Org_ID, #AD_Client_ID - Accounting Schema: e.g. $C_AcctSchema_ID, $C_Calendar_ID - Global defaults: e.g. DateFormat - Window values (all Picks, CheckBoxes, RadioButtons, and DateDoc/DateAcct) c) SQL code with the tag: @SQL=SELECT something AS DefaultValue FROM ... The SQL statement can contain variables. There can be no other value other than the SQL statement. The default is only evaluated, if no user preference is defined. Default definitions are ignored for record columns as Key, Parent, Client as well as Buttons.','Default Logic','Y',TO_DATE('2014-05-29 14:05:37','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2014-05-29 14:05:37','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N',272,10,897) +; + +-- May 29, 2014 2:05:50 PM ICT +ALTER TABLE AD_InfoColumn ADD DefaultValue VARCHAR2(2000) DEFAULT NULL +; + +-- May 29, 2014 2:07:35 PM ICT +INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES (0,'N',844,0,'N','N',240,'Y',203048,'N','The defaults are evaluated in the order of definition, the first not null value becomes the default value of the column. The values are separated by comma or semicolon. a) Literals:. ''Text'' or 123 b) Variables - in format @Variable@ - Login e.g. #Date, #AD_Org_ID, #AD_Client_ID - Accounting Schema: e.g. $C_AcctSchema_ID, $C_Calendar_ID - Global defaults: e.g. DateFormat - Window values (all Picks, CheckBoxes, RadioButtons, and DateDoc/DateAcct) c) SQL code with the tag: @SQL=SELECT something AS DefaultValue FROM ... The SQL statement can contain variables. There can be no other value other than the SQL statement. The default is only evaluated, if no user preference is defined. Default definitions are ignored for record columns as Key, Parent, Client as well as Buttons.','Default value hierarchy, separated by ;','Default Logic','df17ed00-801b-4e24-892c-5b15760ef9f6','Y','N',100,0,100,TO_DATE('2014-05-29 14:07:29','YYYY-MM-DD HH24:MI:SS'),'Y','Y',150,1,'N',0,1,1,'N','N',211272,'D',TO_DATE('2014-05-29 14:07:29','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=180, IsDisplayed='Y', XPosition=1, ColumnSpan=5,Updated=TO_DATE('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203048 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=190,Updated=TO_DATE('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201635 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=200,Updated=TO_DATE('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201636 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=210,Updated=TO_DATE('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13603 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=220,Updated=TO_DATE('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201622 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=230,Updated=TO_DATE('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201623 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=240,Updated=TO_DATE('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13597 +; +SELECT register_migration_script('201405291604_IDEMPIERE-1792.sql') FROM dual +; diff --git a/migration/i2.0z/oracle/201406041804_IDEMPIERE-1792.sql b/migration/i2.0z/oracle/201406041804_IDEMPIERE-1792.sql new file mode 100644 index 0000000000..3e2ad07629 --- /dev/null +++ b/migration/i2.0z/oracle/201406041804_IDEMPIERE-1792.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Jun 4, 2014 6:03:55 PM COT +-- IDEMPIERE-1792 Info Window - Default Logic missing +UPDATE AD_Field SET DisplayLogic='@IsQueryCriteria@=Y',Updated=TO_DATE('2014-06-04 18:03:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203048 +; + +SELECT register_migration_script('201406041804_IDEMPIERE-1792.sql') FROM dual +; + diff --git a/migration/i2.0z/postgresql/201405271604_IDEMPIERE-1878.sql b/migration/i2.0z/postgresql/201405271604_IDEMPIERE-1878.sql new file mode 100644 index 0000000000..bf54ecf4d9 --- /dev/null +++ b/migration/i2.0z/postgresql/201405271604_IDEMPIERE-1878.sql @@ -0,0 +1,176 @@ +-- May 27, 2014 10:33:16 PM ICT +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +UPDATE AD_Column SET IsSyncDatabase='Y', IsTranslated='Y', ColumnName='Name', AD_Org_ID=0, AD_Client_ID=0,Updated=TO_TIMESTAMP('2014-05-27 22:33:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7019 +; + +-- May 27, 2014 10:33:17 PM ICT +UPDATE AD_Column SET IsSyncDatabase='Y', IsTranslated='Y', ColumnName='Description', AD_Org_ID=0, AD_Client_ID=0,Updated=TO_TIMESTAMP('2014-05-27 22:33:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7025 +; + +-- May 27, 2014 10:33:23 PM ICT +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Window_ID,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,Name,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Processing,AD_Client_ID,Created) VALUES ('N','6',70,240,200130,'N','N','Y','D','L','f6afaadd-dc3a-4b1e-ac86-cf4f562e6dc3','Y','N','AD_PrintFormat_Trl','Data Print Format','Print Format Trl','Y',0,100,TO_TIMESTAMP('2014-05-27 22:33:17','YYYY-MM-DD HH24:MI:SS'),100,'N',0,TO_TIMESTAMP('2014-05-27 22:33:17','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:24 PM ICT +INSERT INTO AD_Sequence (StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,IncrementNo,AD_Sequence_UU,AD_Org_ID,CreatedBy,Updated,UpdatedBy,IsActive,StartNo,AD_Client_ID,Created) VALUES ('N',200000,'Y',1000000,'N','Y',200177,'Table AD_PrintFormat_Trl','AD_PrintFormat_Trl',1,'5140cb57-062d-4516-b167-62a9086f6eb7',0,100,TO_TIMESTAMP('2014-05-27 22:33:23','YYYY-MM-DD HH24:MI:SS'),100,'Y',1000000,0,TO_TIMESTAMP('2014-05-27 22:33:23','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:25 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211259,'Y','N','N','Y',10,'N','N','N','Y','f9ac04a4-8316-444b-9498-a21ae57ff33d','N','AD_PrintFormat_ID','Data Print Format','0','The print format determines how data is rendered for print.','Print Format','Y',TO_TIMESTAMP('2014-05-27 22:33:24','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:24','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','adprintformat_trl','N',1790,19,200130) +; + +-- May 27, 2014 10:33:25 PM ICT +CREATE TABLE AD_PrintFormat_Trl (AD_PrintFormat_ID NUMERIC(10) DEFAULT 0 NOT NULL, CONSTRAINT AD_PrintFormat_Trl_Key PRIMARY KEY (AD_PrintFormat_ID)) +; + +-- May 27, 2014 10:33:27 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintName,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211260,'Y','N','N','Y',6,'N','N','N','Y','eff27d6a-7790-487d-829d-cfa56eacb0f8','N','AD_Language','Language for this entity','The Language identifies the language to use for display and formatting','Language','Y',TO_TIMESTAMP('2014-05-27 22:33:26','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:26','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','adlanguage_adprintformtrl','N',109,18,106,200130) +; + +-- May 27, 2014 10:33:27 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN AD_Language VARCHAR(6) NOT NULL +; + +-- May 27, 2014 10:33:27 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID) VALUES ('Y',0.0,211261,'Y','N','N','N',10,'N','N','N','Y','7a497225-b391-4ed3-9521-c987218f4b1f','N','AD_Client_ID','Client/Tenant for this installation.','@#AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',TO_TIMESTAMP('2014-05-27 22:33:27','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:27','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',102,19,200130,129) +; + +-- May 27, 2014 10:33:27 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN AD_Client_ID NUMERIC(10) NOT NULL +; + +-- May 27, 2014 10:33:28 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID) VALUES ('Y',0.0,211262,'Y','N','N','N',10,'N','N','N','Y','61e40f14-4e0f-43f3-a43d-e5381e6a19f0','N','AD_Org_ID','Organizational entity within client','@#AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',TO_TIMESTAMP('2014-05-27 22:33:27','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:27','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',113,19,200130,104) +; + +-- May 27, 2014 10:33:28 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN AD_Org_ID NUMERIC(10) NOT NULL +; + +-- May 27, 2014 10:33:29 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211263,'Y','N','N','N',1,'N','N','N','Y','dc9ebff5-1a13-4978-bd6d-8a576a96db1f','Y','IsActive','The record is active in the system','Y','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Active','N',TO_TIMESTAMP('2014-05-27 22:33:28','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:28','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',348,20,200130) +; + +-- May 27, 2014 10:33:29 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL +; + +-- May 27, 2014 10:33:30 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211264,'Y','N','N','N',29,'N','N','N','Y','b5c86f41-f3f3-449c-b8de-15c6185b00ee','N','Created','Date this record was created','SYSDATE','The Created field indicates the date that this record was created.','Created','N',TO_TIMESTAMP('2014-05-27 22:33:29','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:29','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',245,16,200130) +; + +-- May 27, 2014 10:33:30 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN Created TIMESTAMP DEFAULT statement_timestamp() NOT NULL +; + +-- May 27, 2014 10:33:31 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211265,'Y','N','N','N',10,'N','N','N','Y','a7c8903f-1993-46e6-90c8-e26bb3c28559','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',TO_TIMESTAMP('2014-05-27 22:33:30','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:30','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',246,18,110,200130) +; + +-- May 27, 2014 10:33:31 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN CreatedBy NUMERIC(10) NOT NULL +; + +-- May 27, 2014 10:33:32 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211266,'Y','N','N','N',29,'N','N','N','Y','0ff1758a-763b-4ea9-9d6e-552aff285f9a','N','Updated','Date this record was updated','SYSDATE','The Updated field indicates the date that this record was updated.','Updated','N',TO_TIMESTAMP('2014-05-27 22:33:31','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:31','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',607,16,200130) +; + +-- May 27, 2014 10:33:32 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN Updated TIMESTAMP DEFAULT statement_timestamp() NOT NULL +; + +-- May 27, 2014 10:33:33 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID) VALUES ('Y',0.0,211267,'Y','N','N','N',10,'N','N','N','Y','f6635c5b-d08e-4c11-91e8-e174ab9a6443','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',TO_TIMESTAMP('2014-05-27 22:33:32','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:32','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',608,18,110,200130) +; + +-- May 27, 2014 10:33:33 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN UpdatedBy NUMERIC(10) NOT NULL +; + +-- May 27, 2014 10:33:34 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211268,'Y','N','Y','N',60,'Y','N','N','Y','2063175c-cd06-44d2-9a98-7864dfb763df','Y','Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Name','Y',TO_TIMESTAMP('2014-05-27 22:33:33','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:33','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',469,10,200130) +; + +-- May 27, 2014 10:33:34 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN Name VARCHAR(60) NOT NULL +; + +-- May 27, 2014 10:33:34 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211269,'N','N','N','N',255,'Y','N','N','Y','02dab09d-1d15-4698-b729-ec756656a1f4','Y','Description','Optional short description of the record','A description is limited to 255 characters.','Description','Y',TO_TIMESTAMP('2014-05-27 22:33:34','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:34','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',275,10,200130) +; + +-- May 27, 2014 10:33:35 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN Description VARCHAR(255) DEFAULT NULL +; + +-- May 27, 2014 10:33:35 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211270,'Y','N','N','N',1,'N','N','N','Y','a2912e1e-48ee-4389-acb8-52d64e5c0698','Y','IsTranslated','This column is translated','The Translated checkbox indicates if this column is translated.','Translated','Y',TO_TIMESTAMP('2014-05-27 22:33:35','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:35','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',420,20,200130) +; + +-- May 27, 2014 10:33:35 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN IsTranslated CHAR(1) CHECK (IsTranslated IN ('Y','N')) NOT NULL +; + +-- May 27, 2014 10:33:36 PM ICT +INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,AD_Org_ID,CreatedBy,UpdatedBy,IsActive,AD_Client_ID,EntityType,Created,Updated) VALUES ('AD_PrintFormat_Trl_UU',202715,'AD_PrintFormat_Trl_UU','AD_PrintFormat_Trl_UU','ae168f8a-94f1-4327-ba4e-38c92616dc34',0,100,100,'Y',0,'D',TO_TIMESTAMP('2014-05-27 22:33:36','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2014-05-27 22:33:36','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:37 PM ICT +INSERT INTO AD_Column (IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,FKConstraintType,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES ('Y',0.0,211271,'N','N','N','N',36,'N','N','N','Y','8919e165-e58c-4c5c-8a57-fa21c0391dff','N','AD_PrintFormat_Trl_UU','AD_PrintFormat_Trl_UU','N',TO_TIMESTAMP('2014-05-27 22:33:36','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-27 22:33:36','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N','N',202715,10,200130) +; + +-- May 27, 2014 10:33:37 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD COLUMN AD_PrintFormat_Trl_UU VARCHAR(36) DEFAULT NULL +; + +-- May 27, 2014 10:33:37 PM ICT +ALTER TABLE AD_PrintFormat_Trl ADD CONSTRAINT AD_PrintFormat_Trl_UU_idx UNIQUE (AD_PrintFormat_Trl_UU) +; + +-- May 27, 2014 10:33:38 PM ICT +INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,HasTree,IsInfoTab,IsReadOnly,IsInsertRecord,IsAdvancedTab,TabLevel,AD_Tab_UU,EntityType,Name,AD_Tab_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive,AD_Column_ID,AD_Table_ID,AD_Client_ID,TreeDisplayedOn) VALUES ('N','N','Y',240,70,'Y','N','N','N','N','Y','N',1,'3c39505a-e38d-495d-aa7e-ce50e02e4208','D','Translate',200143,0,TO_TIMESTAMP('2014-05-27 22:33:37','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2014-05-27 22:33:37','YYYY-MM-DD HH24:MI:SS'),100,'Y',211259,200130,0,'B') +; + +-- May 27, 2014 10:33:39 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,36,'N','N',0,'Y',203039,'N','AD_PrintFormat_Trl_UU','abb5adb7-ba95-4027-9d7c-264ad30d77d3','N','N',100,0,100,TO_TIMESTAMP('2014-05-27 22:33:38','YYYY-MM-DD HH24:MI:SS'),'Y','N',1,'N',0,2,1,'N','N',211271,'D',TO_TIMESTAMP('2014-05-27 22:33:38','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:40 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,10,'N','N',10,'Y',203040,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client/Tenant for this installation.','Client','d35d06cd-dfb8-47a2-b819-71cd095cbf1a','Y','N',100,0,100,TO_TIMESTAMP('2014-05-27 22:33:39','YYYY-MM-DD HH24:MI:SS'),'Y','Y',10,1,'N',0,2,1,'N','N',211261,'D',TO_TIMESTAMP('2014-05-27 22:33:39','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:41 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,IsAllowCopy,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,10,'N','N',20,'Y',203041,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organizational entity within client','Organization','a47b16bb-15c7-44cc-a6b0-a522e810a677','Y','N','Y',100,0,100,TO_TIMESTAMP('2014-05-27 22:33:40','YYYY-MM-DD HH24:MI:SS'),'Y','N',4,'N',0,2,1,'N','N',211262,'D',TO_TIMESTAMP('2014-05-27 22:33:40','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:42 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,10,'N','N',30,'Y',203042,'N','The print format determines how data is rendered for print.','Data Print Format','Print Format','d77ffb69-faae-4d58-a018-620c84392609','Y','N',100,0,100,TO_TIMESTAMP('2014-05-27 22:33:41','YYYY-MM-DD HH24:MI:SS'),'Y','Y',40,1,'N',0,2,1,'N','N',211259,'D',TO_TIMESTAMP('2014-05-27 22:33:41','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:43 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,6,'N','N',40,'Y',203043,'N','The Language identifies the language to use for display and formatting','Language for this entity','Language','3fe13437-7fd4-4d30-a8f8-7443805ee8c2','Y','N',100,0,100,TO_TIMESTAMP('2014-05-27 22:33:42','YYYY-MM-DD HH24:MI:SS'),'Y','Y',50,1,'N',0,2,1,'N','N',211260,'D',TO_TIMESTAMP('2014-05-27 22:33:42','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:44 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,60,'N','N',50,'Y',203044,'N','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','Alphanumeric identifier of the entity','Name','5ac3896d-d640-471d-b429-9194266e11ee','Y','N',100,0,100,TO_TIMESTAMP('2014-05-27 22:33:43','YYYY-MM-DD HH24:MI:SS'),'Y','Y',20,1,'N',0,5,1,'N','N',211268,'D',TO_TIMESTAMP('2014-05-27 22:33:43','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:45 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,255,'N','N',60,'Y',203045,'N','A description is limited to 255 characters.','Optional short description of the record','Description','b4f2d4ad-29d6-4dc8-af15-6156c4bd392e','Y','N',100,0,100,TO_TIMESTAMP('2014-05-27 22:33:44','YYYY-MM-DD HH24:MI:SS'),'Y','Y',30,1,'N',0,5,1,'N','N',211269,'D',TO_TIMESTAMP('2014-05-27 22:33:44','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:45 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,1,'N','N',70,'Y',203046,'N','The Translated checkbox indicates if this column is translated.','This column is translated','Translated','3fd4e7d7-ce58-4eae-afc4-daec3090e45b','Y','N',100,0,100,TO_TIMESTAMP('2014-05-27 22:33:45','YYYY-MM-DD HH24:MI:SS'),'Y','Y',60,2,'N',0,2,1,'N','N',211270,'D',TO_TIMESTAMP('2014-05-27 22:33:45','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 27, 2014 10:33:46 PM ICT +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES ('N',200143,1,'N','N',80,'Y',203047,'N','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','The record is active in the system','Active','518eb2fb-6cb8-4963-89d5-2bf0268ba49f','Y','N',100,0,100,TO_TIMESTAMP('2014-05-27 22:33:45','YYYY-MM-DD HH24:MI:SS'),'Y','Y',70,5,'N',0,2,1,'N','N',211263,'D',TO_TIMESTAMP('2014-05-27 22:33:45','YYYY-MM-DD HH24:MI:SS')) +; +SELECT register_migration_script('201405271604_IDEMPIERE-1878.sql') FROM dual +; diff --git a/migration/i2.0z/postgresql/201405291604_IDEMPIERE-1792.sql b/migration/i2.0z/postgresql/201405291604_IDEMPIERE-1792.sql new file mode 100644 index 0000000000..d5164926f6 --- /dev/null +++ b/migration/i2.0z/postgresql/201405291604_IDEMPIERE-1792.sql @@ -0,0 +1,42 @@ +-- May 29, 2014 2:05:43 PM ICT +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,IsSecure,AD_Element_ID,AD_Reference_ID,AD_Table_ID) VALUES (0,'N',0,211272,'N','N','N',0,'N',2000,'N','N','N','Y','1a19bfbb-e413-4e31-b635-a40068f21a0d','Y','DefaultValue','Default value hierarchy, separated by ;','The defaults are evaluated in the order of definition, the first not null value becomes the default value of the column. The values are separated by comma or semicolon. a) Literals:. ''Text'' or 123 b) Variables - in format @Variable@ - Login e.g. #Date, #AD_Org_ID, #AD_Client_ID - Accounting Schema: e.g. $C_AcctSchema_ID, $C_Calendar_ID - Global defaults: e.g. DateFormat - Window values (all Picks, CheckBoxes, RadioButtons, and DateDoc/DateAcct) c) SQL code with the tag: @SQL=SELECT something AS DefaultValue FROM ... The SQL statement can contain variables. There can be no other value other than the SQL statement. The default is only evaluated, if no user preference is defined. Default definitions are ignored for record columns as Key, Parent, Client as well as Buttons.','Default Logic','Y',TO_TIMESTAMP('2014-05-29 14:05:37','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2014-05-29 14:05:37','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N','N',272,10,897) +; + +-- May 29, 2014 2:05:50 PM ICT +ALTER TABLE AD_InfoColumn ADD COLUMN DefaultValue VARCHAR(2000) DEFAULT NULL +; + +-- May 29, 2014 2:07:35 PM ICT +INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,Description,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField,IsDefaultFocus,AD_Column_ID,EntityType,Created) VALUES (0,'N',844,0,'N','N',240,'Y',203048,'N','The defaults are evaluated in the order of definition, the first not null value becomes the default value of the column. The values are separated by comma or semicolon. a) Literals:. ''Text'' or 123 b) Variables - in format @Variable@ - Login e.g. #Date, #AD_Org_ID, #AD_Client_ID - Accounting Schema: e.g. $C_AcctSchema_ID, $C_Calendar_ID - Global defaults: e.g. DateFormat - Window values (all Picks, CheckBoxes, RadioButtons, and DateDoc/DateAcct) c) SQL code with the tag: @SQL=SELECT something AS DefaultValue FROM ... The SQL statement can contain variables. There can be no other value other than the SQL statement. The default is only evaluated, if no user preference is defined. Default definitions are ignored for record columns as Key, Parent, Client as well as Buttons.','Default value hierarchy, separated by ;','Default Logic','df17ed00-801b-4e24-892c-5b15760ef9f6','Y','N',100,0,100,TO_TIMESTAMP('2014-05-29 14:07:29','YYYY-MM-DD HH24:MI:SS'),'Y','Y',150,1,'N',0,1,1,'N','N',211272,'D',TO_TIMESTAMP('2014-05-29 14:07:29','YYYY-MM-DD HH24:MI:SS')) +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=180, IsDisplayed='Y', XPosition=1, ColumnSpan=5,Updated=TO_TIMESTAMP('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203048 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=190,Updated=TO_TIMESTAMP('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201635 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=200,Updated=TO_TIMESTAMP('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201636 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=210,Updated=TO_TIMESTAMP('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13603 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=220,Updated=TO_TIMESTAMP('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201622 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=230,Updated=TO_TIMESTAMP('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201623 +; + +-- May 29, 2014 2:08:42 PM ICT +UPDATE AD_Field SET SeqNo=240,Updated=TO_TIMESTAMP('2014-05-29 14:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13597 +; +SELECT register_migration_script('201405291604_IDEMPIERE-1792.sql') FROM dual +; diff --git a/migration/i2.0z/postgresql/201406041804_IDEMPIERE-1792.sql b/migration/i2.0z/postgresql/201406041804_IDEMPIERE-1792.sql new file mode 100644 index 0000000000..066b7b9f32 --- /dev/null +++ b/migration/i2.0z/postgresql/201406041804_IDEMPIERE-1792.sql @@ -0,0 +1,8 @@ +-- Jun 4, 2014 6:03:55 PM COT +-- IDEMPIERE-1792 Info Window - Default Logic missing +UPDATE AD_Field SET DisplayLogic='@IsQueryCriteria@=Y',Updated=TO_TIMESTAMP('2014-06-04 18:03:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203048 +; + +SELECT register_migration_script('201406041804_IDEMPIERE-1792.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java b/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java index 1822ea4c61..2ae25b537e 100644 --- a/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java +++ b/org.adempiere.base/src/org/adempiere/util/ProcessUtil.java @@ -53,7 +53,7 @@ import org.compiere.wf.MWorkflow; */ public final class ProcessUtil { - public static final String JASPER_STARTER_CLASS = "org.compiere.report.ReportStarter"; + public static final String JASPER_STARTER_CLASS = "org.adempiere.report.jasper.ReportStarter"; /** Logger */ private static CLogger log = CLogger.getCLogger(ProcessUtil.class); diff --git a/org.adempiere.base/src/org/compiere/model/GridField.java b/org.adempiere.base/src/org/compiere/model/GridField.java index 8d4f328fdd..f3228a5de0 100644 --- a/org.adempiere.base/src/org/compiere/model/GridField.java +++ b/org.adempiere.base/src/org/compiere/model/GridField.java @@ -589,7 +589,7 @@ public class GridField * (b) SQL Statement (for data integity & consistency) */ String defStr = ""; - if (m_vo.DefaultValue.startsWith("@SQL=")) + if (m_vo.DefaultValue != null && m_vo.DefaultValue.startsWith("@SQL=")) { String sql = m_vo.DefaultValue.substring(5); // w/o tag //sql = Env.parseContext(m_vo.ctx, m_vo.WindowNo, sql, false, true); // replace variables @@ -637,7 +637,7 @@ public class GridField /** * (c) Field DefaultValue === similar code in AStartRPDialog.getDefault === */ - if (!m_vo.DefaultValue.equals("") && !m_vo.DefaultValue.startsWith("@SQL=")) + if (m_vo.DefaultValue != null && !m_vo.DefaultValue.equals("") && !m_vo.DefaultValue.startsWith("@SQL=")) { defStr = ""; // problem is with texts like 'sss;sss' // It is one or more variables/constants diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index 2752b9014c..ca8d7ca42f 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -519,9 +519,9 @@ public class GridFieldVO implements Serializable public int SeqNo = 0; /** Grid Display sequence */ public int SeqNoGrid = 0; - /** Dislay Logic */ + /** Dislay Logic, never set null for it */ public String DisplayLogic = ""; - /** Default Value */ + /** Default Value, never set null for it */ public String DefaultValue = ""; /** Mandatory */ public boolean IsMandatory = false; diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_InfoColumn.java b/org.adempiere.base/src/org/compiere/model/I_AD_InfoColumn.java index 0909620672..d403f0196f 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_InfoColumn.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_InfoColumn.java @@ -188,6 +188,21 @@ public interface I_AD_InfoColumn */ public int getCreatedBy(); + /** Column name DefaultValue */ + public static final String COLUMNNAME_DefaultValue = "DefaultValue"; + + /** Set Default Logic. + * Default value hierarchy, separated by ; + + */ + public void setDefaultValue (String DefaultValue); + + /** Get Default Logic. + * Default value hierarchy, separated by ; + + */ + public String getDefaultValue(); + /** Column name Description */ public static final String COLUMNNAME_Description = "Description"; diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index aa7b8e1c3d..10129c10b7 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -758,10 +758,9 @@ public class MInOut extends X_M_InOut implements DocAction line.setM_RMALine_ID(peer.getRef_RMALine_ID()); } } - else if (!isSOTrx()) - { - line.setQtyOverReceipt(fromLine.getQtyOverReceipt()); - } + + line.setQtyOverReceipt(fromLine.getQtyOverReceipt()); + // line.setProcessed(false); if (line.save(get_TrxName())) @@ -1290,7 +1289,6 @@ public class MInOut extends X_M_InOut implements DocAction BigDecimal Qty = sLine.getMovementQty(); if (MovementType.charAt(1) == '-') // C- Customer Shipment - V- Vendor Return Qty = Qty.negate(); - BigDecimal QtySO = Env.ZERO; // Update Order Line MOrderLine oLine = null; @@ -1299,8 +1297,6 @@ public class MInOut extends X_M_InOut implements DocAction oLine = new MOrderLine (getCtx(), sLine.getC_OrderLine_ID(), get_TrxName()); if (log.isLoggable(Level.FINE)) log.fine("OrderLine - Reserved=" + oLine.getQtyReserved() + ", Delivered=" + oLine.getQtyDelivered()); - if (isSOTrx()) - QtySO = sLine.getMovementQty(); } @@ -1326,41 +1322,29 @@ public class MInOut extends X_M_InOut implements DocAction log.fine("Material Transaction"); MTransaction mtrx = null; - //same warehouse in order and receipt? - boolean sameWarehouse = true; - // Reservation ASI - assume none - int reservationAttributeSetInstance_ID = 0; // sLine.getM_AttributeSetInstance_ID(); - int reservationWarehouse_ID = getM_Warehouse_ID(); - if (oLine != null) { - reservationAttributeSetInstance_ID = oLine.getM_AttributeSetInstance_ID(); - sameWarehouse = oLine.getM_Warehouse_ID()==getM_Warehouse_ID(); - } - if(!sameWarehouse){ - reservationWarehouse_ID = oLine.getM_Warehouse_ID(); - } + // BigDecimal overReceipt = BigDecimal.ZERO; - if (!isSOTrx()) - { - if (!isReversal()) + if (!isReversal()) + { + if (oLine != null) { - if (oLine != null) + BigDecimal toDelivered = oLine.getQtyOrdered() + .subtract(oLine.getQtyDelivered()); + if (sLine.getMovementQty().compareTo(toDelivered) > 0) + overReceipt = sLine.getMovementQty().subtract( + toDelivered); + if (overReceipt.signum() != 0) { - BigDecimal toDelivered = oLine.getQtyOrdered().subtract(oLine.getQtyDelivered()); - if (sLine.getMovementQty().compareTo(toDelivered) > 0) - overReceipt = sLine.getMovementQty().subtract(toDelivered); - if (overReceipt.signum() != 0) - { - sLine.setQtyOverReceipt(overReceipt); - sLine.saveEx(); - } + sLine.setQtyOverReceipt(overReceipt); + sLine.saveEx(); } } - else - { - overReceipt = sLine.getQtyOverReceipt(); - } - } + } + else + { + overReceipt = sLine.getQtyOverReceipt(); + } BigDecimal orderedQtyToUpdate = sLine.getMovementQty().subtract(overReceipt); // if (sLine.getM_AttributeSetInstance_ID() == 0) @@ -1373,27 +1357,6 @@ public class MInOut extends X_M_InOut implements DocAction BigDecimal QtyMA = ma.getMovementQty(); if (MovementType.charAt(1) == '-') // C- Customer Shipment - V- Vendor Return QtyMA = QtyMA.negate(); - BigDecimal reservedDiff = Env.ZERO; - if (sLine.getC_OrderLine_ID() != 0) - { - if (isSOTrx()) - { - reservedDiff = ma.getMovementQty().negate(); - } - else - { - if (orderedQtyToUpdate.compareTo(ma.getMovementQty()) >= 0) - { - orderedQtyToUpdate = orderedQtyToUpdate.subtract(ma.getMovementQty()); - reservedDiff = ma.getMovementQty().negate(); - } - else - { - reservedDiff = orderedQtyToUpdate.negate(); - orderedQtyToUpdate = BigDecimal.ZERO; - } - } - } // Update Storage - see also VMatch.createMatchRecord if (!MStorageOnHand.add(getCtx(), getM_Warehouse_ID(), @@ -1406,20 +1369,7 @@ public class MInOut extends X_M_InOut implements DocAction String lastError = CLogger.retrieveErrorString(""); m_processMsg = "Cannot correct Inventory OnHand (MA) [" + product.getValue() + "] - " + lastError; return DocAction.STATUS_Invalid; - } - if (reservedDiff.signum() != 0) { - if (!MStorageReservation.add(getCtx(), reservationWarehouse_ID, - sLine.getM_Product_ID(), - ma.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID, - reservedDiff, - isSOTrx(), - get_TrxName())) - { - String lastError = CLogger.retrieveErrorString(""); - m_processMsg = "Cannot correct Inventory " + (isSOTrx()? "Reserved" : "Ordered") + " (MA) - [" + product.getValue() + "] - " + lastError; - return DocAction.STATUS_Invalid; - } - } + } // Create Transaction mtrx = new MTransaction (getCtx(), sLine.getAD_Org_ID(), @@ -1433,16 +1383,29 @@ public class MInOut extends X_M_InOut implements DocAction return DocAction.STATUS_Invalid; } } + + if (oLine!=null && mtrx!=null) + { + if (sLine.getC_OrderLine_ID() != 0) + { + if (!MStorageReservation.add(getCtx(), oLine.getM_Warehouse_ID(), + sLine.getM_Product_ID(), + oLine.getM_AttributeSetInstance_ID(), + orderedQtyToUpdate.negate(), + isSOTrx(), + get_TrxName())) + { + String lastError = CLogger.retrieveErrorString(""); + m_processMsg = "Cannot correct Inventory " + (isSOTrx()? "Reserved" : "Ordered") + " (MA) - [" + product.getValue() + "] - " + lastError; + return DocAction.STATUS_Invalid; + } + } + } + } // sLine.getM_AttributeSetInstance_ID() != 0 if (mtrx == null) { - BigDecimal reservedDiff = null; - if(isSOTrx()) - reservedDiff = QtySO.negate(); - else - reservedDiff = orderedQtyToUpdate.negate(); - Timestamp dateMPolicy = getMovementDate(); if(sLine.getM_AttributeSetInstance_ID()>0){ I_M_AttributeSetInstance asi = sLine.getM_AttributeSetInstance(); @@ -1460,11 +1423,12 @@ public class MInOut extends X_M_InOut implements DocAction m_processMsg = "Cannot correct Inventory OnHand [" + product.getValue() + "] - " + lastError; return DocAction.STATUS_Invalid; } - if (reservedDiff.signum() != 0) { - if (!MStorageReservation.add(getCtx(), reservationWarehouse_ID, + if (oLine!=null) + { + if (!MStorageReservation.add(getCtx(), oLine.getM_Warehouse_ID(), sLine.getM_Product_ID(), - sLine.getM_AttributeSetInstance_ID(), reservationAttributeSetInstance_ID, - reservedDiff, isSOTrx(), get_TrxName())) + oLine.getM_AttributeSetInstance_ID(), + orderedQtyToUpdate.negate(), isSOTrx(), get_TrxName())) { m_processMsg = "Cannot correct Inventory Reserved " + (isSOTrx()? "Reserved [" :"Ordered [") + product.getValue() + "]"; return DocAction.STATUS_Invalid; diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index 2d89d4454f..bf9ac17089 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -1747,7 +1747,7 @@ public class MOrder extends X_C_Order implements DocAction // Update Reservation Storage if (!MStorageReservation.add(getCtx(), line.getM_Warehouse_ID(), line.getM_Product_ID(), - line.getM_AttributeSetInstance_ID(), line.getM_AttributeSetInstance_ID(), + line.getM_AttributeSetInstance_ID(), difference, isSOTrx, get_TrxName())) return false; } // stocked diff --git a/org.adempiere.base/src/org/compiere/model/MStorageReservation.java b/org.adempiere.base/src/org/compiere/model/MStorageReservation.java index 7945e638e8..243842dee2 100644 --- a/org.adempiere.base/src/org/compiere/model/MStorageReservation.java +++ b/org.adempiere.base/src/org/compiere/model/MStorageReservation.java @@ -210,22 +210,20 @@ public class MStorageReservation extends X_M_StorageReservation { } /** - * Update Storage Info add. - * Called from MProjectIssue - * @param ctx context - * @param M_Warehouse_ID warehouse - * @param M_Product_ID product - * @param M_AttributeSetInstance_ID AS Instance - * @param reservationAttributeSetInstance_ID reservation AS Instance - * @param diffQty add - * @param isSOTrx - * @param trxName transaction - * @return true if updated + * + * @param ctx + * @param M_Warehouse_ID + * @param M_Product_ID + * @param M_AttributeSetInstance_ID + * @param diffQty + * @param isSOTrx + * @param trxName + * @return */ public static boolean add (Properties ctx, int M_Warehouse_ID, - int M_Product_ID, int M_AttributeSetInstance_ID, int reservationAttributeSetInstance_ID, - BigDecimal diffQty, boolean isSOTrx, String trxName) - { + int M_Product_ID, int M_AttributeSetInstance_ID, + BigDecimal diffQty, boolean isSOTrx, String trxName){ + if (diffQty == null || diffQty.signum() == 0) return true; @@ -233,13 +231,8 @@ public class MStorageReservation extends X_M_StorageReservation { MProduct prd = new MProduct(ctx, M_Product_ID, trxName); if (prd.getM_AttributeSet_ID() == 0 || ! prd.getM_AttributeSet().isInstanceAttribute()) { // Product doesn't manage attribute set, always reserved with 0 - reservationAttributeSetInstance_ID = 0; M_AttributeSetInstance_ID = 0; } - // - if (M_AttributeSetInstance_ID != reservationAttributeSetInstance_ID) { - M_AttributeSetInstance_ID = reservationAttributeSetInstance_ID; - } // Get Storage MStorageReservation storage = getCreate (ctx, M_Warehouse_ID, @@ -261,6 +254,28 @@ public class MStorageReservation extends X_M_StorageReservation { s_log.fine(diffText.toString()); } return storage.save (trxName); + } + + /** + * Update Storage Info add. + * Called from MProjectIssue + * @param ctx context + * @param M_Warehouse_ID warehouse + * @param M_Product_ID product + * @param M_AttributeSetInstance_ID AS Instance + * @param reservationAttributeSetInstance_ID reservation AS Instance + * @param diffQty add + * @param isSOTrx + * @param trxName transaction + * @return true if updated + */ + @Deprecated + public static boolean add (Properties ctx, int M_Warehouse_ID, + int M_Product_ID, int M_AttributeSetInstance_ID, int reservationAttributeSetInstance_ID, + BigDecimal diffQty, boolean isSOTrx, String trxName) + { + + return add(ctx, M_Warehouse_ID, M_Product_ID, reservationAttributeSetInstance_ID, diffQty, isSOTrx, trxName); } // add /** diff --git a/org.adempiere.base/src/org/compiere/model/Query.java b/org.adempiere.base/src/org/compiere/model/Query.java index e64ac5ccde..9a3b4b398d 100644 --- a/org.adempiere.base/src/org/compiere/model/Query.java +++ b/org.adempiere.base/src/org/compiere/model/Query.java @@ -204,7 +204,15 @@ public class Query */ public Query setClient_ID() { - this.onlyClient_ID = true; + return setClient_ID (true); + } + + /** + * Set include or not include AD_Client_ID in where clause + */ + public Query setClient_ID(boolean isIncludeClient) + { + this.onlyClient_ID = isIncludeClient; return this; } diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_InfoColumn.java b/org.adempiere.base/src/org/compiere/model/X_AD_InfoColumn.java index a38fdddb2b..377beb4d7d 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_InfoColumn.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_InfoColumn.java @@ -30,7 +30,7 @@ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent /** * */ - private static final long serialVersionUID = 20131031L; + private static final long serialVersionUID = 20140529L; /** Standard Constructor */ public X_AD_InfoColumn (Properties ctx, int AD_InfoColumn_ID, String trxName) @@ -280,6 +280,23 @@ public class X_AD_InfoColumn extends PO implements I_AD_InfoColumn, I_Persistent return (String)get_Value(COLUMNNAME_ColumnName); } + /** Set Default Logic. + @param DefaultValue + Default value hierarchy, separated by ; + */ + public void setDefaultValue (String DefaultValue) + { + set_Value (COLUMNNAME_DefaultValue, DefaultValue); + } + + /** Get Default Logic. + @return Default value hierarchy, separated by ; + */ + public String getDefaultValue () + { + return (String)get_Value(COLUMNNAME_DefaultValue); + } + /** Set Description. @param Description Optional short description of the record diff --git a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java index c17a9fa1f2..27e1569d13 100644 --- a/org.adempiere.base/src/org/compiere/print/MPrintFormat.java +++ b/org.adempiere.base/src/org/compiere/print/MPrintFormat.java @@ -29,9 +29,6 @@ import java.util.HashMap; import java.util.List; import java.util.Properties; import java.util.logging.Level; - -import javax.sql.RowSet; - import org.adempiere.model.MTabCustomization; import org.compiere.model.GridField; import org.compiere.model.GridTab; @@ -42,9 +39,9 @@ import org.compiere.model.Query; import org.compiere.model.X_AD_PrintFormat; import org.compiere.util.CCache; import org.compiere.util.CLogger; -import org.compiere.util.CPreparedStatement; import org.compiere.util.DB; import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; import org.compiere.util.Language; import org.compiere.util.Msg; import org.compiere.util.Util; @@ -1159,56 +1156,66 @@ public class MPrintFormat extends X_AD_PrintFormat /** * @param AD_Table_ID - * @param AD_Client_ID use -1 to retrieve from all client - * @param trxName - */ - public static RowSet getAccessiblePrintFormats (int AD_Table_ID, int AD_Client_ID, String trxName) - { - return getAccessiblePrintFormats(AD_Table_ID, -1, AD_Client_ID, trxName); - } - - /** - * @param AD_Table_ID * @param AD_Window_ID * @param AD_Client_ID use -1 to retrieve from all client * @param trxName */ - public static RowSet getAccessiblePrintFormats (int AD_Table_ID, int AD_Window_ID, int AD_Client_ID, String trxName) + public static List getAccessiblePrintFormats (int AD_Table_ID, int AD_Window_ID, String trxName, boolean makeNewWhenEmpty) { - RowSet rowSet = null; - String sql = "SELECT AD_PrintFormat_ID, Name, AD_Client_ID " - + "FROM AD_PrintFormat " - + "WHERE AD_Table_ID=? AND IsTableBased='Y' "; + // append WHERE to can use MRole.getDefault().addAccessSQL + String sqlWhere = " WHERE AD_Table_ID=? AND IsTableBased='Y' "; if (AD_Window_ID > 0) - sql += "AND (AD_Window_ID=? OR AD_Window_ID IS NULL) "; - if (AD_Client_ID >= 0) - sql += " AND AD_Client_ID = ? "; - sql = sql + "ORDER BY AD_Client_ID DESC, IsDefault DESC, Name"; // Own First + sqlWhere += "AND (AD_Window_ID=? OR AD_Window_ID IS NULL) "; // - sql = MRole.getDefault().addAccessSQL ( - sql, "AD_PrintFormat", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); - CPreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, trxName); - int count = 1; - pstmt.setInt(count++, AD_Table_ID); + sqlWhere = MRole.getDefault().addAccessSQL ( + sqlWhere, "AD_PrintFormat", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + + // remove " WHERE " to use in Query + sqlWhere = sqlWhere.substring(6); + + // add sql parameter + List lsParameter = new ArrayList(); + + lsParameter.add(new Integer(AD_Table_ID)); if (AD_Window_ID > 0) - pstmt.setInt(count++, AD_Window_ID); - if (AD_Client_ID >= 0) - pstmt.setInt(count++, AD_Client_ID); - rowSet = pstmt.getRowSet(); - } - catch (SQLException e) - { - s_log.log(Level.SEVERE, sql, e); - } - finally { - DB.close(pstmt); - pstmt = null; + lsParameter.add(new Integer(AD_Window_ID)); + + // init query + Query query = new Query(Env.getCtx(), MPrintFormat.Table_Name, sqlWhere, trxName); + + query.setParameters(lsParameter); + + query.setOrderBy(" ORDER BY AD_Client_ID DESC, IsDefault DESC, Name "); + + // query print fomart just in this client + List lsPrintFormat = query.setClient_ID().list(); + MPrintFormat newPrintFormat = null; + + if (lsPrintFormat.size() == 0){ + // get print format form other client + newPrintFormat = query.setClient_ID(false).first(); } - return rowSet; + // if must get from other client, make new print format is copy from other client + if (newPrintFormat != null){ + newPrintFormat = MPrintFormat.copyToClient(Env.getCtx(), newPrintFormat.getAD_PrintFormat_ID(), Env.getAD_Client_ID(Env.getCtx())); + lsPrintFormat.add(newPrintFormat); + } + + // none client have print format, make new from default template + if (lsPrintFormat.size() == 0){ + newPrintFormat = MPrintFormat.createFromTable(Env.getCtx(), AD_Table_ID); + lsPrintFormat.add(newPrintFormat); + } + + // convert lsPrintFormat to list KeyNamePair, apply translate for name column + List m_list = new ArrayList(); + + for (MPrintFormat printFormat : lsPrintFormat){ + m_list.add(new KeyNamePair(printFormat.get_ID(), printFormat.get_Translation(MPrintFormat.COLUMNNAME_Name))); + } + + return m_list; } @Override diff --git a/org.adempiere.base/src/org/compiere/util/Login.java b/org.adempiere.base/src/org/compiere/util/Login.java index 583b09666f..b9464bef66 100644 --- a/org.adempiere.base/src/org/compiere/util/Login.java +++ b/org.adempiere.base/src/org/compiere/util/Login.java @@ -998,7 +998,8 @@ public class Login { if (TableName.startsWith("AD_Window") || TableName.startsWith("AD_PrintFormat") - || TableName.startsWith("AD_Workflow") ) + || TableName.startsWith("AD_Workflow") + || TableName.startsWith("M_Locator") ) return; String value = null; // diff --git a/org.adempiere.report.jasper.swing/META-INF/MANIFEST.MF b/org.adempiere.report.jasper.swing/META-INF/MANIFEST.MF index 220e624922..a3c23f3e9f 100644 --- a/org.adempiere.report.jasper.swing/META-INF/MANIFEST.MF +++ b/org.adempiere.report.jasper.swing/META-INF/MANIFEST.MF @@ -5,9 +5,11 @@ Bundle-SymbolicName: org.adempiere.report.jasper.swing;singleton:=true Bundle-Version: 2.0.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: org.adempiere.base;bundle-version="2.0.0", - org.adempiere.ui.swing;bundle-version="2.0.0", - org.adempiere.report.jasper;bundle-version="2.0.0", - org.adempiere.report.jasper.library;bundle-version="2.0.0" -Import-Package: org.osgi.framework + org.adempiere.ui.swing;bundle-version="2.0.0" +Import-Package: net.sf.jasperreports.engine, + net.sf.jasperreports.engine.export, + net.sf.jasperreports.view, + org.adempiere.report.jasper, + org.osgi.framework Service-Component: OSGI-INF/jrviewerprovider.xml Bundle-ActivationPolicy: lazy diff --git a/org.adempiere.report.jasper.swing/OSGI-INF/jrviewerprovider.xml b/org.adempiere.report.jasper.swing/OSGI-INF/jrviewerprovider.xml index d15ca6e471..1e7305e452 100644 --- a/org.adempiere.report.jasper.swing/OSGI-INF/jrviewerprovider.xml +++ b/org.adempiere.report.jasper.swing/OSGI-INF/jrviewerprovider.xml @@ -2,6 +2,6 @@ - + diff --git a/org.adempiere.report.jasper.swing/src/org/compiere/report/SwingJRViewerProvider.java b/org.adempiere.report.jasper.swing/src/org/compiere/report/SwingJRViewerProvider.java index 3c621af3a5..b02603e47e 100644 --- a/org.adempiere.report.jasper.swing/src/org/compiere/report/SwingJRViewerProvider.java +++ b/org.adempiere.report.jasper.swing/src/org/compiere/report/SwingJRViewerProvider.java @@ -1,5 +1,7 @@ package org.compiere.report; +import org.adempiere.report.jasper.JRViewerProvider; + import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JasperPrint; diff --git a/org.adempiere.report.jasper/.project b/org.adempiere.report.jasper/.project index 1287b5ba0c..69f07bfe3c 100644 --- a/org.adempiere.report.jasper/.project +++ b/org.adempiere.report.jasper/.project @@ -25,6 +25,11 @@ + + org.eclipse.pde.ds.core.builder + + + org.eclipse.jem.workbench.JavaEMFNature diff --git a/org.adempiere.report.jasper/META-INF/MANIFEST.MF b/org.adempiere.report.jasper/META-INF/MANIFEST.MF index 562f552c67..a49cb3b47f 100644 --- a/org.adempiere.report.jasper/META-INF/MANIFEST.MF +++ b/org.adempiere.report.jasper/META-INF/MANIFEST.MF @@ -4,12 +4,13 @@ Bundle-Name: JasperReport integration Bundle-SymbolicName: org.adempiere.report.jasper;singleton:=true Bundle-Version: 2.0.0.qualifier Bundle-ClassPath: JasperReports.jar -Export-Package: org.compiere.report, - org.compiere.utils -Require-Bundle: org.adempiere.base;bundle-version="2.0.0", - org.adempiere.report.jasper.library;bundle-version="2.0.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: org.apache.commons.codec, org.apache.commons.codec.binary, org.apache.commons.logging;version="1.1.1", org.apache.commons.logging.impl;version="1.1.1" +Require-Bundle: org.adempiere.base;bundle-version="2.0.0", + org.adempiere.report.jasper.library;bundle-version="2.0.0" +Service-Component: OSGI-INF/processfactory.xml +Export-Package: org.adempiere.report.jasper +Bundle-ActivationPolicy: lazy diff --git a/org.adempiere.report.jasper/OSGI-INF/processfactory.xml b/org.adempiere.report.jasper/OSGI-INF/processfactory.xml new file mode 100644 index 0000000000..4ab516c7e9 --- /dev/null +++ b/org.adempiere.report.jasper/OSGI-INF/processfactory.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/org.adempiere.report.jasper/build.properties b/org.adempiere.report.jasper/build.properties index fbee266820..adfe22c4eb 100644 --- a/org.adempiere.report.jasper/build.properties +++ b/org.adempiere.report.jasper/build.properties @@ -1,4 +1,5 @@ +bin.includes = META-INF/,\ + JasperReports.jar,\ + OSGI-INF/ source.JasperReports.jar = src/ output.JasperReports.jar = build/ -bin.includes = META-INF/,\ - JasperReports.jar diff --git a/org.adempiere.report.jasper/src/org/compiere/report/Barbecue.java b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/Barbecue.java similarity index 92% rename from org.adempiere.report.jasper/src/org/compiere/report/Barbecue.java rename to org.adempiere.report.jasper/src/org/adempiere/report/jasper/Barbecue.java index 1ca9aa9249..6cc619f6db 100644 --- a/org.adempiere.report.jasper/src/org/compiere/report/Barbecue.java +++ b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/Barbecue.java @@ -1,4 +1,4 @@ -package org.compiere.report; +package org.adempiere.report.jasper; import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; diff --git a/org.adempiere.report.jasper/src/org/compiere/report/JRViewerProvider.java b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/JRViewerProvider.java similarity index 82% rename from org.adempiere.report.jasper/src/org/compiere/report/JRViewerProvider.java rename to org.adempiere.report.jasper/src/org/adempiere/report/jasper/JRViewerProvider.java index 50c4b95269..323486b96c 100644 --- a/org.adempiere.report.jasper/src/org/compiere/report/JRViewerProvider.java +++ b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/JRViewerProvider.java @@ -1,4 +1,4 @@ -package org.compiere.report; +package org.adempiere.report.jasper; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JasperPrint; diff --git a/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ProcessFactory.java b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ProcessFactory.java new file mode 100644 index 0000000000..bca37fc619 --- /dev/null +++ b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ProcessFactory.java @@ -0,0 +1,47 @@ +/****************************************************************************** + * Copyright (C) 2014 Thomas Bayen * + * Copyright (C) 2014 Jakob Bayen KG & BX Service GmbH * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package org.adempiere.report.jasper; + +import org.adempiere.base.IProcessFactory; +import org.adempiere.util.ProcessUtil; +import org.compiere.process.ProcessCall; + +/** + * ProcessFactory to start the ReportStarter class. + * + * Before this Factory was initiated the class was started with the + * DefaultProcessFactory because its package namespace was exported and joined + * into the org.compiere.report package of the org.adempiere.base plugin via + * Split Packages (through the Require-Bundle technique) See + * http://wiki.osgi.org/wiki/Split_Packages why this is not the best idea. + * Especially this prevents us from exchange the JasperReports plugin with + * another implementation. + * + * @author tbayen + */ +public class ProcessFactory implements IProcessFactory { + + public static final String JASPER_STARTER_CLASS_DEPRECATED = "org.compiere.report.ReportStarter"; + + @Override + public ProcessCall newProcessInstance(String className) { + if (ProcessUtil.JASPER_STARTER_CLASS.equals(className)) + return new ReportStarter(); + // this is for compatibility with older installations + if (JASPER_STARTER_CLASS_DEPRECATED.equals(className)) + return new ReportStarter(); + else + return null; + } +} diff --git a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java similarity index 97% rename from org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java rename to org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java index d4af2c36c3..f76ce1c739 100644 --- a/org.adempiere.report.jasper/src/org/compiere/report/ReportStarter.java +++ b/org.adempiere.report.jasper/src/org/adempiere/report/jasper/ReportStarter.java @@ -11,7 +11,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * * For the text or an alternative of this public license, you may reach us * *****************************************************************************/ -package org.compiere.report; +package org.adempiere.report.jasper; import java.awt.print.PrinterJob; import java.io.ByteArrayOutputStream; diff --git a/org.adempiere.server-feature/feature.xml b/org.adempiere.server-feature/feature.xml index ffc01b9529..ef1b34f3a4 100644 --- a/org.adempiere.server-feature/feature.xml +++ b/org.adempiere.server-feature/feature.xml @@ -38,6 +38,10 @@ id="org.idempiere.felix.webconsole" version="2.0.0.qualifier"/> + + diff --git a/org.adempiere.server-feature/server.product.launch b/org.adempiere.server-feature/server.product.launch index 95b6fd410f..8be9f7e59d 100644 --- a/org.adempiere.server-feature/server.product.launch +++ b/org.adempiere.server-feature/server.product.launch @@ -22,8 +22,8 @@ - - + + diff --git a/org.adempiere.server/META-INF/MANIFEST.MF b/org.adempiere.server/META-INF/MANIFEST.MF index b728aa06f4..db79da8f8b 100644 --- a/org.adempiere.server/META-INF/MANIFEST.MF +++ b/org.adempiere.server/META-INF/MANIFEST.MF @@ -4,9 +4,7 @@ Bundle-Name: org.adempiere.server Bundle-SymbolicName: org.adempiere.server;singleton:=true Bundle-Version: 2.0.0.qualifier Require-Bundle: org.adempiere.base;bundle-version="2.0.0", - org.eclipse.equinox.app;bundle-version="1.3.0", - org.adempiere.report.jasper;bundle-version="2.0.0", - org.adempiere.report.jasper.library;bundle-version="2.0.0" + org.eclipse.equinox.app;bundle-version="1.3.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Web-ContextPath: / Bundle-ClassPath: WEB-INF/lib/jardiff.jar, diff --git a/org.adempiere.ui.swing/META-INF/MANIFEST.MF b/org.adempiere.ui.swing/META-INF/MANIFEST.MF index 8564bbb6a4..4893a5dbcb 100644 --- a/org.adempiere.ui.swing/META-INF/MANIFEST.MF +++ b/org.adempiere.ui.swing/META-INF/MANIFEST.MF @@ -69,8 +69,6 @@ Export-Package: com.jgoodies.looks, org.jdesktop.swingx.util Require-Bundle: org.adempiere.base;bundle-version="2.0.0", org.adempiere.ui;bundle-version="2.0.0", - org.adempiere.report.jasper;bundle-version="2.0.0", - org.adempiere.report.jasper.library;bundle-version="2.0.0", org.restlet;bundle-version="2.1.0", org.restlet.ext.net;bundle-version="2.1.0", org.restlet.ext.servlet;bundle-version="2.1.0", @@ -79,6 +77,7 @@ Eclipse-ExtensibleAPI: true Eclipse-RegisterBuddy: org.adempiere.base Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: javax.net.ssl, + net.sf.jasperreports.engine, org.apache.ecs, org.apache.ecs.xhtml, org.apache.poi.hssf.usermodel, diff --git a/org.adempiere.ui.swing/src/org/compiere/print/AReport.java b/org.adempiere.ui.swing/src/org/compiere/print/AReport.java index 27e39c2850..f0b08b58d4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/print/AReport.java +++ b/org.adempiere.ui.swing/src/org/compiere/print/AReport.java @@ -19,14 +19,11 @@ package org.compiere.print; import java.awt.Cursor; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.sql.SQLException; import java.util.ArrayList; +import java.util.List; import java.util.logging.Level; - -import javax.sql.RowSet; import javax.swing.JComponent; import javax.swing.JPopupMenu; - import org.adempiere.util.IProcessUI; import org.compiere.apps.ADialog; import org.compiere.apps.ClientProcessCtrl; @@ -133,7 +130,7 @@ public class AReport implements ActionListener /** The Popup */ private JPopupMenu m_popup = new JPopupMenu("ReportMenu"); /** The Option List */ - private ArrayList m_list = new ArrayList(); + private List m_list = new ArrayList(); /** Logger */ private static CLogger log = CLogger.getCLogger(AReport.class); /** The parent window for locking/unlocking during process execution */ @@ -151,62 +148,20 @@ public class AReport implements ActionListener */ private void getPrintFormats (int AD_Table_ID, int AD_Window_ID, JComponent invoker) { - int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx()); - RowSet rowSet = MPrintFormat.getAccessiblePrintFormats(AD_Table_ID, AD_Window_ID, -1, null); - KeyNamePair pp = null; - try - { - while (rowSet.next()) - { - pp = new KeyNamePair (rowSet.getInt(1), rowSet.getString(2)); - if (rowSet.getInt(3) == AD_Client_ID) - { - m_list.add(pp); - m_popup.add(pp.toString()).addActionListener(this); - } - } - } - catch (SQLException e) - { - log.log(Level.SEVERE, e.getLocalizedMessage(), e); - } - - // No Format exists - create it - if (m_list.size() == 0) - { - if (pp == null) - createNewFormat (AD_Table_ID); // calls launch - else - copyFormat(pp.getKey(), AD_Client_ID); - } - // One Format exists or no invoker - show it - else if (m_list.size() == 1 || invoker == null) + m_list = MPrintFormat.getAccessiblePrintFormats(AD_Table_ID, AD_Window_ID, null, true); + + if (m_list.size() == 1 || invoker == null) launchReport ((KeyNamePair)m_list.get(0)); // Multiple Formats exist - show selection - else if (invoker.isShowing()) + else if (invoker.isShowing()){ + for (KeyNamePair printFormatInfo : m_list) + m_popup.add(printFormatInfo.toString()).addActionListener(this); + m_popup.show(invoker, 0, invoker.getHeight()); // below button + } + } // getPrintFormats - /** - * Create and Launch new Format for table - * @param AD_Table_ID table - */ - private void createNewFormat (int AD_Table_ID) - { - MPrintFormat pf = MPrintFormat.createFromTable(Env.getCtx(), AD_Table_ID); - launchReport (pf); - } // createNewFormat - - /** - * Copy existing Format - * @param AD_PrintFormat_ID print format - * @param To_Client_ID to client - */ - private void copyFormat (int AD_PrintFormat_ID, int To_Client_ID) - { - MPrintFormat pf = MPrintFormat.copyToClient(Env.getCtx(), AD_PrintFormat_ID, To_Client_ID); - launchReport (pf); - } // copyFormatFromClient /** * Launch Report diff --git a/org.adempiere.ui.zk/META-INF/MANIFEST.MF b/org.adempiere.ui.zk/META-INF/MANIFEST.MF index ea49117063..68bfe07fe4 100644 --- a/org.adempiere.ui.zk/META-INF/MANIFEST.MF +++ b/org.adempiere.ui.zk/META-INF/MANIFEST.MF @@ -8,6 +8,10 @@ Import-Package: javax.activation;version="1.1.1", javax.servlet, javax.servlet.http, metainfo.zk, + net.sf.jasperreports.engine, + net.sf.jasperreports.engine.export, + net.sf.jasperreports.engine.util, + org.adempiere.report.jasper, org.apache.commons.codec.binary, org.apache.ecs, org.apache.ecs.xhtml, @@ -79,9 +83,7 @@ Export-Package: fi.jawsy.jawwa.zk.atmosphere, web.js.jawwa.atmosphere, web.js.zkforge, web.js.zkforge.mold -Require-Bundle: org.adempiere.report.jasper;bundle-version="2.0.0", - org.adempiere.base;bundle-version="2.0.0", - org.adempiere.report.jasper.library;bundle-version="2.0.0", +Require-Bundle: org.adempiere.base;bundle-version="2.0.0", org.adempiere.ui;bundle-version="2.0.0", org.zkoss.zk.library;bundle-version="6.0.0", org.apache.catalina;bundle-version="7.0.35" diff --git a/org.adempiere.ui.zk/OSGI-INF/jrviewerprovider.xml b/org.adempiere.ui.zk/OSGI-INF/jrviewerprovider.xml index 33b21de28e..802836a337 100644 --- a/org.adempiere.ui.zk/OSGI-INF/jrviewerprovider.xml +++ b/org.adempiere.ui.zk/OSGI-INF/jrviewerprovider.xml @@ -2,6 +2,6 @@ - + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index 55dabbc1af..160e3a92f4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -1655,5 +1655,13 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer Clients.response(new AuScript(script.toString())); } } + + @Override + public void setParent(Component parent) { + super.setParent(parent); + if (parent != null) { + listPanel.onADTabPanelParentChanged(); + } + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index a8a56968e8..a3b37faf9e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -1373,7 +1373,14 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements String origmsg = null; if (msg != null && msg.length() > 0) { - origmsg = Msg.getMsg(Env.getCtx(), e.getAD_Message()); + if (detailTab && GridTable.DATA_REFRESH_MESSAGE.equals(e.getAD_Message())) + { + origmsg = e.getTotalRows() + " " + Msg.getMsg(Env.getCtx(), "Records"); + } + else + { + origmsg = Msg.getMsg(Env.getCtx(), e.getAD_Message()); + } adMessage.append(origmsg); } String info = e.getInfo(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java index bba3ddefa9..8f6e3d8131 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java @@ -59,6 +59,7 @@ import org.zkoss.zul.Div; import org.zkoss.zul.Frozen; import org.zkoss.zul.Paging; import org.zkoss.zul.Row; +import org.zkoss.zul.Tabpanel; import org.zkoss.zul.Vbox; import org.zkoss.zul.event.ZulEvents; @@ -144,7 +145,6 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi this.setHflex("1"); gridFooter = new Div(); - gridFooter.setHflex("1"); gridFooter.setVflex("0"); //default paging size @@ -200,6 +200,11 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi if (paging != null && paging.getPageSize() != pageSize) { paging.setPageSize(pageSize); updateModel(); + if (paging.getPageSize() > 1) { + showPagingControl(); + } else { + hidePagingControl(); + } } } @@ -222,6 +227,21 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi updateListIndex(); this.init = true; + + showRecordsCount(); + } + + private void showRecordsCount() { + Component parent = this.getParent(); + while (parent != null) { + if (parent instanceof DetailPane) { + DetailPane p = (DetailPane) parent; + if (p.getSelectedADTabpanel() != null && p.getSelectedADTabpanel().getGridTab() == this.gridTab) + p.setStatusMessage(tableModel.getRowCount() + " " + Msg.getMsg(Env.getCtx(), "Records"), false); + break; + } + parent = parent.getParent(); + } } private void setupFields(GridTab gridTab) { @@ -295,6 +315,8 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi public void activate(GridTab gridTab) { if (!isInit()) { init(gridTab); + } else { + showRecordsCount(); } if (this.isVisible()) Clients.resize(listbox); @@ -338,7 +360,7 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi if (paging.getTotalSize() != gridTab.getRowCount()) paging.setTotalSize(gridTab.getRowCount()); if (paging.getPageCount() > 1 && !gridFooter.isVisible()) { - gridFooter.setVisible(true); + showPagingControl(); } int pgIndex = rowIndex >= 0 ? rowIndex % pageSize : 0; int pgNo = rowIndex >= 0 ? (rowIndex - pgIndex) / pageSize : 0; @@ -368,9 +390,9 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi paging.setActivePage(pgNo); } if (paging.getPageCount() == 1) { - gridFooter.setVisible(false); + hidePagingControl(); } else { - gridFooter.setVisible(true); + showPagingControl(); } if (rowIndex >= 0 && pgIndex >= 0) { echoOnPostSelectedRowChanged(); @@ -379,7 +401,17 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi if (rowIndex >= 0) { echoOnPostSelectedRowChanged(); } - } + } + } + + private void hidePagingControl() { + if (gridFooter.isVisible()) + gridFooter.setVisible(false); + } + + private void showPagingControl() { + if (!gridFooter.isVisible()) + gridFooter.setVisible(true); } /** @@ -541,20 +573,20 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi paging.setPageSize(pageSize); paging.setTotalSize(tableModel.getRowCount()); paging.setDetailed(true); - gridFooter.appendChild(paging); - gridFooter.setSclass("adtab-grid-south"); + paging.setId("paging"); + gridFooter.appendChild(paging); paging.addEventListener(ZulEvents.ON_PAGING, this); renderer.setPaging(paging); if (paging.getPageCount() == 1) { - gridFooter.setVisible(false); + hidePagingControl(); } else { - gridFooter.setVisible(true); - } - paging.setId("paging"); + showPagingControl(); + } + positionPagingControl(); } else { - gridFooter.setVisible(false); + hidePagingControl(); } } @@ -1089,4 +1121,38 @@ public class GridView extends Vbox implements EventListener, IdSpace, IFi break; } } + + protected void onADTabPanelParentChanged() { + positionPagingControl(); + } + + private void positionPagingControl() { + if (isDetailPane()) { + Component parent = this.getParent(); + while (parent != null) { + if (parent instanceof Tabpanel) { + Component firstChild = parent.getFirstChild(); + if ( gridFooter.getParent() != firstChild ) { + firstChild.appendChild(gridFooter); + gridFooter.setHflex("0"); + gridFooter.setSclass("adwindow-detailpane-adtab-grid-south"); + } + break; + } + parent = parent.getParent(); + } + if (paging != null) + paging.setDetailed(false); + } + else + { + if (gridFooter.getParent() != this) { + gridFooter.setHflex("1"); + gridFooter.setSclass("adtab-grid-south"); + appendChild(gridFooter); + } + if (paging != null) + paging.setDetailed(true); + } + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java index 3f25b8b06a..29917b534a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java @@ -99,6 +99,8 @@ import com.lowagie.text.pdf.PdfWriter; */ public class ProcessDialog extends AbstractProcessDialog implements EventListener, IHelpContext { + public static final String ON_INITIAL_FOCUS_EVENT = "onInitialFocus"; + /** * generate serial version ID */ @@ -154,6 +156,7 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene init(Env.getCtx(), WindowNo, AD_Process_ID, null, "70%", false, false); querySaved(); addEventListener(WindowContainer.ON_WINDOW_CONTAINER_SELECTION_CHANGED_EVENT, this); + addEventListener(ON_INITIAL_FOCUS_EVENT, this); } catch(Exception ex) { @@ -360,6 +363,14 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene bSave.setEnabled(enabled && !lastRun); bDelete.setEnabled(enabled && fSavedName.getSelectedIndex() > -1 && !lastRun); + } else if (event.getName().equals(ON_INITIAL_FOCUS_EVENT)) { + if (!isUILocked()) + { + if (!getParameterPanel().focusToFirstEditor()) + { + bOK.focus(); + } + } } else { super.onEvent(event); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java index 7f0bba4168..81d8560fb4 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java @@ -25,11 +25,14 @@ import java.util.logging.Level; import org.adempiere.webui.component.Column; import org.adempiere.webui.component.Columns; +import org.adempiere.webui.component.EditorBox; import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.GridFactory; +import org.adempiere.webui.component.NumberBox; import org.adempiere.webui.component.Panel; import org.adempiere.webui.component.Row; import org.adempiere.webui.component.Rows; +import org.adempiere.webui.component.Urlbox; import org.adempiere.webui.editor.IZoomableEditor; import org.adempiere.webui.editor.WEditor; import org.adempiere.webui.editor.WEditorPopupMenu; @@ -51,6 +54,8 @@ import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.Msg; +import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.HtmlBasedComponent; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; @@ -815,7 +820,31 @@ public class ProcessParameterPanel extends Panel implements public void setProcessInfo(ProcessInfo processInfo) { m_processInfo = processInfo; } + + public boolean focusToFirstEditor() { + if (m_wEditors.isEmpty()) + return false; + for(WEditor editor : m_wEditors) { + if (editor.isVisible()) { + focusToEditor(editor); + return true; + } + } + return false; + } + private void focusToEditor(WEditor toFocus) { + Component c = toFocus.getComponent(); + if (c instanceof EditorBox) { + c = ((EditorBox)c).getTextbox(); + } else if (c instanceof NumberBox) { + c = ((NumberBox)c).getDecimalbox(); + } else if (c instanceof Urlbox) { + c = ((Urlbox)c).getTextbox(); + } + ((HtmlBasedComponent)c).focus(); + } + static class ZoomListener implements EventListener { private IZoomableEditor searchEditor; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java index 33006cd8d7..a940915d8f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WReport.java @@ -16,12 +16,9 @@ *****************************************************************************/ package org.adempiere.webui.apps; -import java.sql.SQLException; import java.util.ArrayList; +import java.util.List; import java.util.logging.Level; - -import javax.sql.RowSet; - import org.adempiere.webui.window.FDialog; import org.compiere.model.MQuery; import org.compiere.model.MRole; @@ -112,7 +109,7 @@ public class WReport implements EventListener { private MQuery m_query; private Menupopup m_popup; /** The Option List */ - private ArrayList m_list = new ArrayList(); + private List m_list = new ArrayList(); /** Logger */ private static CLogger log = CLogger.getCLogger(WReport.class); /** The parent window for locking/unlocking during process execution */ @@ -130,35 +127,9 @@ public class WReport implements EventListener { */ private void getPrintFormats (int AD_Table_ID, int AD_Window_ID) { - int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx()); - RowSet rowSet = MPrintFormat.getAccessiblePrintFormats(AD_Table_ID, AD_Window_ID, -1, null); - KeyNamePair pp = null; - try - { - while (rowSet.next()) - { - pp = new KeyNamePair (rowSet.getInt(1), rowSet.getString(2)); - if (rowSet.getInt(3) == AD_Client_ID) - { - m_list.add(pp); - } - } - } - catch (SQLException e) - { - log.log(Level.SEVERE, e.getLocalizedMessage(), e); - } + m_list = MPrintFormat.getAccessiblePrintFormats(AD_Table_ID, AD_Window_ID, null, true); - // No Format exists - create it - if (m_list.size() == 0) - { - if (pp == null) - createNewFormat (AD_Table_ID); // calls launch - else - copyFormat(pp.getKey(), AD_Client_ID); - } - // One Format exists or no invoker - show it - else if (m_list.size() == 1) + if (m_list.size() == 1) launchReport ((KeyNamePair)m_list.get(0)); // Multiple Formats exist - show selection else @@ -179,27 +150,6 @@ public class WReport implements EventListener { m_popup.open(parent); } - /** - * Create and Launch new Format for table - * @param AD_Table_ID table - */ - private void createNewFormat (int AD_Table_ID) - { - MPrintFormat pf = MPrintFormat.createFromTable(Env.getCtx(), AD_Table_ID); - launchReport (pf); - } // createNewFormat - - /** - * Copy existing Format - * @param AD_PrintFormat_ID print format - * @param To_Client_ID to client - */ - private void copyFormat (int AD_PrintFormat_ID, int To_Client_ID) - { - MPrintFormat pf = MPrintFormat.copyToClient(Env.getCtx(), AD_PrintFormat_ID, To_Client_ID); - launchReport (pf); - } // copyFormatFromClient - /** * Launch Report * @param pp Key=AD_PrintFormat_ID diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java index 2d67994c88..ece9a346e8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java @@ -27,6 +27,7 @@ import org.adempiere.base.event.IEventManager; import org.adempiere.base.event.IEventTopics; import org.adempiere.model.MBroadcastMessage; import org.adempiere.util.ServerContext; +import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.apps.BusyDialog; @@ -37,6 +38,7 @@ import org.adempiere.webui.component.Tab; import org.adempiere.webui.component.Tabpanel; import org.adempiere.webui.component.ToolBar; import org.adempiere.webui.component.ToolBarButton; +import org.adempiere.webui.component.Window; import org.adempiere.webui.event.DrillEvent; import org.adempiere.webui.event.MenuListener; import org.adempiere.webui.event.ZKBroadCastManager; @@ -111,6 +113,8 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria private static final String IMAGES_DOWNARROW_PNG = "images/expand-header.png"; private static final String IMAGES_CONTEXT_HELP_PNG = "images/Help16.png"; + + private static final String IMAGES_THREELINE_MENU_PNG = "images/threelines.png"; @SuppressWarnings("unused") private static final CLogger logger = CLogger.getCLogger(DefaultDesktop.class); @@ -138,6 +142,12 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria private ToolBarButton max; private ToolBarButton contextHelp; + + private ToolBarButton showHeader; + + private Component headerContainer; + + private Window headerPopup; public DefaultDesktop() { @@ -156,12 +166,14 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria queue.subscribe(this); } - protected Component doCreatePart(Component parent) + @SuppressWarnings("serial") + protected Component doCreatePart(Component parent) { PageDefinition pagedef = Executions.getCurrent().getPageDefinition(ThemeManager.getThemeResource("zul/desktop/desktop.zul")); Component page = Executions.createComponents(pagedef, parent, null); layout = (Borderlayout) page.getFellow("layout"); - pnlHead = (HeaderPanel) page.getFellow("northBody").getFellow("header"); + headerContainer = page.getFellow("northBody"); + pnlHead = (HeaderPanel) headerContainer.getFellow("header"); layout.addEventListener("onZoom", this); layout.addEventListener(DrillEvent.ON_DRILL_DOWN, this); @@ -275,6 +287,23 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria ToolBar toolbar = new ToolBar(); windowContainer.getComponent().appendChild(toolbar); + showHeader = new ToolBarButton() { + @Override + public void onPageDetached(Page page) { + super.onPageDetached(page); + if (DefaultDesktop.this.headerPopup != null) { + DefaultDesktop.this.headerPopup.setPage(null); + } + } + + }; + toolbar.appendChild(showHeader); + showHeader.setImage(ThemeManager.getThemeResource(IMAGES_THREELINE_MENU_PNG)); + showHeader.addEventListener(Events.ON_CLICK, this); + showHeader.setSclass("window-container-toolbar-btn"); + showHeader.setStyle("cursor: pointer; border: 1px solid transparent; padding: 2px;"); + showHeader.setVisible(false); + max = new ToolBarButton(); toolbar.appendChild(max); max.setImage(ThemeManager.getThemeResource(IMAGES_UPARROW_PNG)); @@ -291,6 +320,11 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria contextHelp.setTooltiptext(Util.cleanAmp(Msg.getElement(Env.getCtx(), "AD_CtxHelp_ID"))); contextHelp.setVisible(!e.isVisible()); + boolean headerCollapsed= pref.isPropertyBool(UserPreference.P_HEADER_COLLAPSED); + if (headerCollapsed) { + collapseHeader(); + } + return layout; } @@ -305,6 +339,12 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria pref.setProperty(UserPreference.P_HELP_COLLAPSED, collapsed); pref.savePreference(); } + + private void updateHeaderCollapsedPreference(boolean collapsed) { + UserPreference pref = SessionManager.getSessionApplication().getUserPreference(); + pref.setProperty(UserPreference.P_HEADER_COLLAPSED, collapsed); + pref.savePreference(); + } public void renderHomeTab() { @@ -329,15 +369,20 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria { if (layout.getNorth().isVisible()) { - layout.getNorth().setVisible(false); - max.setImage(ThemeManager.getThemeResource(IMAGES_DOWNARROW_PNG)); + collapseHeader(); } else { - layout.getNorth().setVisible(true); - max.setImage(ThemeManager.getThemeResource(IMAGES_UPARROW_PNG)); + restoreHeader(); } } + else if (comp == showHeader) + { + showHeader.setPressed(true); + if (pnlHead.getParent() != headerPopup) + headerPopup.appendChild(pnlHead); + LayoutUtils.openPopupWindow(showHeader, headerPopup, "after_start"); + } else if (comp == contextHelp) { layout.getEast().setVisible(true); @@ -404,6 +449,41 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria } } + protected void restoreHeader() { + layout.getNorth().setVisible(true); + max.setImage(ThemeManager.getThemeResource(IMAGES_UPARROW_PNG)); + showHeader.setVisible(false); + pnlHead.detach(); + headerContainer.appendChild(pnlHead); + Clients.resize(pnlHead); + updateHeaderCollapsedPreference(false); + } + + protected void collapseHeader() { + layout.getNorth().setVisible(false); + max.setImage(ThemeManager.getThemeResource(IMAGES_DOWNARROW_PNG)); + showHeader.setVisible(true); + pnlHead.detach(); + if (headerPopup == null) + { + headerPopup = new Window(); + headerPopup.setSclass("desktop-header-popup"); + headerPopup.setVflex("true"); + headerPopup.setVisible(false); + headerPopup.addEventListener(Events.ON_OPEN, new EventListener() { + @Override + public void onEvent(OpenEvent event) throws Exception { + if (!event.isOpen()) { + if (showHeader.isPressed()) + showHeader.setPressed(false); + } + } + }); + } + headerPopup.appendChild(pnlHead); + updateHeaderCollapsedPreference(true); + } + /** * Execute Drill to Query * @param query query @@ -653,4 +733,17 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria } return false; } + + @Override + public void onMenuSelected(int menuId) { + super.onMenuSelected(menuId); + if (showHeader.isVisible()) { + //ensure header popup is close + String script = "var w=zk.Widget.$('#" + layout.getUuid()+"'); " + + "zWatch.fire('onFloatUp', w);"; + Clients.response(new AuScript(script)); + } + } + + } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java index edc8453f1c..bfa5a2ab08 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/TabbedDesktop.java @@ -76,6 +76,7 @@ public abstract class TabbedDesktop extends AbstractDesktop { pd.setTitle(null); preOpenNewTab(); windowContainer.addWindow(tabPanel, title, true); + Events.postEvent(ProcessDialog.ON_INITIAL_FOCUS_EVENT, pd, null); } return pd; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoAssetWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoAssetWindow.java index e323516b68..5f81b73a1e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoAssetWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoAssetWindow.java @@ -3,16 +3,17 @@ */ package org.adempiere.webui.info; +import org.compiere.util.Env; + /** * @author hengsin * */ public class InfoAssetWindow extends InfoWindow { - /** * */ - private static final long serialVersionUID = 623767863373135404L; + private static final long serialVersionUID = 8671986505516245911L; /** * @param WindowNo @@ -49,4 +50,17 @@ public class InfoAssetWindow extends InfoWindow { // TODO Auto-generated constructor stub } + @Override + protected void saveSelectionDetail() { + int row = contentPanel.getSelectedRow(); + if (row == -1) + return; + + super.saveSelectionDetail(); + + // publish for Callout to read + Integer ID = getSelectedRowKey(); + Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "A_Asset_ID", ID == null ? "0" : ID.toString()); + } + } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoBPartnerWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoBPartnerWindow.java index 7a4b15ea14..1d2cce7b24 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoBPartnerWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoBPartnerWindow.java @@ -6,7 +6,6 @@ package org.adempiere.webui.info; import org.adempiere.webui.editor.WEditor; import org.adempiere.webui.panel.InvoiceHistory; import org.compiere.util.Env; -import org.compiere.util.KeyNamePair; import org.compiere.util.Util; /** @@ -17,10 +16,7 @@ public class InfoBPartnerWindow extends InfoWindow { /** * */ - private static final long serialVersionUID = -7970170769665110830L; - - private int m_AD_User_ID_index = -1; - private int m_C_BPartner_Location_ID_index = -1; + private static final long serialVersionUID = 126054851491958589L; /** * @param WindowNo @@ -116,44 +112,11 @@ public class InfoBPartnerWindow extends InfoWindow { if (row == -1) return; - int AD_User_ID = 0; - int C_BPartner_Location_ID = 0; - - if (m_AD_User_ID_index != -1) - { - Object data =contentPanel.getValueAt(row, m_AD_User_ID_index); - if (data instanceof KeyNamePair) - AD_User_ID = ((KeyNamePair)data).getKey(); - } - // - if (m_C_BPartner_Location_ID_index != -1) - { - Object data =contentPanel.getValueAt(row, m_C_BPartner_Location_ID_index); - if (data instanceof KeyNamePair) - C_BPartner_Location_ID = ((KeyNamePair)data).getKey(); - } + super.saveSelectionDetail(); + // publish for Callout to read Integer ID = getSelectedRowKey(); Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "C_BPartner_ID", ID == null ? "0" : ID.toString()); - Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "AD_User_ID", String.valueOf(AD_User_ID)); - Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "C_BPartner_Location_ID", String.valueOf(C_BPartner_Location_ID)); - - super.saveSelectionDetail(); } - @Override - protected void prepareTable() { - super.prepareTable(); - - // Get indexes - for (int i = 0; i < p_layout.length; i++) - { - if (p_layout[i].getKeyPairColSQL().indexOf("AD_User_ID") != -1) - m_AD_User_ID_index = i; - // - if (p_layout[i].getKeyPairColSQL().indexOf("C_BPartner_Location_ID") != -1) - m_C_BPartner_Location_ID_index = i; - } - } - } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoInvoiceWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoInvoiceWindow.java index 705e06dc6d..6a11dd6add 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoInvoiceWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoInvoiceWindow.java @@ -12,11 +12,10 @@ import org.compiere.util.Util; * */ public class InfoInvoiceWindow extends InfoWindow { - /** * */ - private static final long serialVersionUID = 3413423439591833575L; + private static final long serialVersionUID = -5614659763247990639L; /** * @param WindowNo @@ -81,4 +80,17 @@ public class InfoInvoiceWindow extends InfoWindow { dynamicDisplay(null); } + @Override + protected void saveSelectionDetail() { + int row = contentPanel.getSelectedRow(); + if (row == -1) + return; + + super.saveSelectionDetail(); + + // publish for Callout to read + Integer ID = getSelectedRowKey(); + Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "C_Invoice_ID", ID == null ? "0" : ID.toString()); + } + } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java index 2566d20faf..4b7ca1fb52 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoProductWindow.java @@ -823,7 +823,12 @@ public class InfoProductWindow extends InfoWindow { @Override protected void saveSelectionDetail() { + int row = contentPanel.getSelectedRow(); + if (row == -1) + return; + super.saveSelectionDetail(); + if (m_M_AttributeSetInstance_ID == -1) // not selected { Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "M_AttributeSetInstance_ID", "0"); @@ -836,6 +841,9 @@ public class InfoProductWindow extends InfoWindow { Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "M_Locator_ID", String.valueOf(m_M_Locator_ID)); } + // publish for Callout to read + Integer ID = getSelectedRowKey(); + Env.setContext(Env.getCtx(), p_WindowNo, Env.TAB_INFO, "M_Product_ID", ID == null ? "0" : ID.toString()); } @Override diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java index 073e580d83..4a1434df0a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java @@ -379,7 +379,10 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL vo.lookupInfo.IsValidated = false; } } - vo.DisplayLogic = infoColumn.getDisplayLogic() != null ? infoColumn.getDisplayLogic() : ""; + if (infoColumn.getDisplayLogic() != null) + vo.DisplayLogic = infoColumn.getDisplayLogic(); + if (infoColumn.isQueryCriteria() && infoColumn.getDefaultValue() != null) + vo.DefaultValue = infoColumn.getDefaultValue(); String desc = infoColumn.get_Translation("Description"); vo.Description = desc != null ? desc : ""; String help = infoColumn.get_Translation("Help"); @@ -1001,6 +1004,12 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL } fieldEditor.addEventListener(Events.ON_OK, this); + + if (! Util.isEmpty(mField.getVO().DefaultValue, true)) { + // set default value + mField.addPropertyChangeListener(editor); + mField.setValue(mField.getDefault(), true); + } } // addSelectionColumn protected void addSearchParameter(Label label, Component fieldEditor) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HeaderPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HeaderPanel.java index 66bdf45802..4135df2abf 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HeaderPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/HeaderPanel.java @@ -122,7 +122,8 @@ public class HeaderPanel extends Panel implements EventListener @Override public void onPageDetached(Page page) { super.onPageDetached(page); - popMenu.setPage(null); + if (popMenu != null) + popMenu.setPage(null); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java index 89b0254e0c..831b480b8b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java @@ -20,12 +20,9 @@ import static org.compiere.model.SystemIDs.WINDOW_PRINTFORMAT; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.StringWriter; -import java.sql.SQLException; import java.util.ArrayList; +import java.util.List; import java.util.logging.Level; - -import javax.sql.RowSet; - import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.adwindow.AbstractADWindowContent; import org.adempiere.webui.apps.WProcessCtl; @@ -84,7 +81,7 @@ public class ReportAction implements EventListener private Checkbox chkExport = new Checkbox(); private Checkbox chkAllColumns = new Checkbox(); - private ArrayList printFormatList = new ArrayList(); + private List printFormatList = new ArrayList(); public ReportAction(AbstractADWindowContent panel) { @@ -451,29 +448,12 @@ public class ReportAction implements EventListener { printFormatList.clear(); - int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx()); - RowSet rowSet = MPrintFormat.getAccessiblePrintFormats(AD_Table_ID, AD_Window_ID, -1, null); - KeyNamePair pp = null; - try - { - while (rowSet.next()) - { - pp = new KeyNamePair (rowSet.getInt(1), rowSet.getString(2)); - if (rowSet.getInt(3) == AD_Client_ID) - { - printFormatList.add(pp); - } - } - } - catch (SQLException e) - { - log.log(Level.SEVERE, e.getLocalizedMessage(), e); - } + printFormatList = MPrintFormat.getAccessiblePrintFormats(AD_Table_ID, AD_Window_ID, null, false); if (MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false) && Boolean.TRUE.equals(MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT))) { StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(Env.getCtx(), "NewReport")).append(" **"); - pp = new KeyNamePair(-1, sb.toString()); + KeyNamePair pp = new KeyNamePair(-1, sb.toString()); printFormatList.add(pp); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java index a45ac992fe..c1386af423 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java @@ -67,6 +67,10 @@ public final class UserPreference implements Serializable { /** Help Panel Collapsed **/ public static final String P_HELP_COLLAPSED = "HelpCollapsed"; public static final String DEFAULT_HELP_COLLAPSED = "N"; + + /** Header Collapsed **/ + public static final String P_HEADER_COLLAPSED = "HeaderCollapsed"; + public static final String DEFAULT_HEADER_COLLAPSED = "N"; /** Ini Properties */ private static final String[] PROPERTIES = new String[] { @@ -78,7 +82,8 @@ public final class UserPreference implements Serializable { P_AUTO_COMMIT, P_AUTO_NEW, P_MENU_COLLAPSED, - P_HELP_COLLAPSED}; + P_HELP_COLLAPSED, + P_HEADER_COLLAPSED}; /** Ini Property Values */ private static final String[] VALUES = new String[] { DEFAULT_LANGUAGE, @@ -89,7 +94,8 @@ public final class UserPreference implements Serializable { DEFAULT_AUTO_COMMIT, DEFAULT_AUTO_NEW, DEFAULT_MENU_COLLAPSED, - DEFAULT_HELP_COLLAPSED}; + DEFAULT_HELP_COLLAPSED, + DEFAULT_HEADER_COLLAPSED}; /** Container for Properties */ private Properties props = new Properties(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/AboutWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/AboutWindow.java index 5e51eb284b..901ad3f776 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/AboutWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/AboutWindow.java @@ -24,11 +24,14 @@ import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.ConfirmPanel; import org.adempiere.webui.component.FolderBrowser; +import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.Label; import org.adempiere.webui.component.ListHead; import org.adempiere.webui.component.ListHeader; import org.adempiere.webui.component.Listbox; import org.adempiere.webui.component.ListboxFactory; +import org.adempiere.webui.component.Row; +import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.SimpleListModel; import org.adempiere.webui.component.Tab; import org.adempiere.webui.component.Tabbox; @@ -320,16 +323,18 @@ public class AboutWindow extends Window implements EventListener { div.setWidth("100%"); div.setHeight("100%"); div.setStyle("overflow: auto;"); - Hbox hbox = new Hbox(); - LayoutUtils.addSclass("about-credit-panel-logo", hbox); - hbox.setParent(div); + Vbox vbox = new Vbox(); + LayoutUtils.addSclass("about-credit-panel-logo", vbox); + vbox.setParent(div); + Label caption = new Label("Top iDempiere sponsor"); + caption.setStyle("font-weight: bold;"); + caption.setParent(vbox); ToolBarButton link = new ToolBarButton(); + link.setHeight("72px"); link.setImage("images/TrekGlobal.jpg"); - link.setParent(hbox); + link.setParent(vbox); link.setHref("http://www.trekglobal.com"); link.setTarget("_blank"); - Label label= new Label("Top iDempiere sponsor"); - label.setParent(hbox); Separator separator = new Separator(); separator.setParent(div); @@ -338,47 +343,32 @@ public class AboutWindow extends Window implements EventListener { LayoutUtils.addSclass("about-credit-panel-sponsors", panel); panel.setParent(div); panel.setWidth("100%"); - Vbox vbox = new Vbox(); + vbox = new Vbox(); LayoutUtils.addSclass("about-credit-panel-sponsors-header", vbox); vbox.setWidth("100%"); vbox.setParent(panel); - Label caption = new Label("Sponsors"); + caption = new Label("Sponsors"); caption.setStyle("font-weight: bold;"); caption.setParent(vbox); - separator = new Separator(); - separator.setBar(true); - separator.setParent(vbox); Vbox content = new Vbox(); LayoutUtils.addSclass("about-credit-panel-sponsors-links", content); content.setWidth("100%"); content.setParent(panel); - link = new ToolBarButton(); - link.setLabel("GlobalQSS"); - link.setHref("http://www.globalqss.com/"); - link.setTarget("_blank"); - link.setParent(content); + Grid grid = new Grid(); + grid.setParent(content); - link = new ToolBarButton(); - link.setLabel("Adaxa"); - link.setHref("http://www.adaxa.com/"); - link.setTarget("_blank"); - link.setParent(content); + Rows rows = new Rows(); + rows.setParent(grid); - link = new ToolBarButton(); - link.setLabel("Posterita"); - link.setHref("http://www.posterita.com/"); - link.setTarget("_blank"); - link.setParent(content); - - link = new ToolBarButton(); - link.setLabel("Sysnova"); - link.setHref("http://www.sysnova.com/"); - link.setTarget("_blank"); - link.setParent(content); - - separator = new Separator(); - separator.setParent(div); + Row row = new Row(); + row.setParent(rows); + row.appendCellChild(addLink("GlobalQSS", "http://www.globalqss.com/")); + row.appendCellChild(addLink("Adaxa", "http://www.adaxa.com/")); + row.appendCellChild(addLink("Sysnova", "http://www.sysnova.com/")); + row = new Row(); + row.setParent(rows); + row.appendCellChild(addLink("See also ...", "http://www.idempiere.org/sponsors"), 3); panel = new Div(); LayoutUtils.addSclass("about-credit-panel-contributors", panel); @@ -391,47 +381,49 @@ public class AboutWindow extends Window implements EventListener { caption = new Label("Contributors"); caption.setStyle("font-weight: bold;"); caption.setParent(vbox); - separator = new Separator(); - separator.setBar(true); - separator.setParent(vbox); content = new Vbox(); LayoutUtils.addSclass("about-credit-panel-contributors-links", content); content.setWidth("100%"); content.setParent(panel); - link = new ToolBarButton(); - link.setLabel("Low Heng Sin"); - link.setHref("http://www.adempiere.com/User:Hengsin"); - link.setTarget("_blank"); - link.setParent(content); + grid = new Grid(); + grid.setParent(content); - link = new ToolBarButton(); - link.setLabel("Ashley G Ramdass"); - link.setHref("http://www.adempiere.com/User:Agramdass"); - link.setTarget("_blank"); - link.setParent(content); + rows = new Rows(); + rows.setParent(grid); - link = new ToolBarButton(); - link.setLabel("Carlos Ruiz"); - link.setHref("http://www.adempiere.com/User:CarlosRuiz"); - link.setTarget("_blank"); - link.setParent(content); - - link = new ToolBarButton(); - link.setLabel("Teo Sarca"); - link.setHref("http://www.adempiere.com/User:Teo_sarca"); - link.setTarget("_blank"); - link.setParent(content); - - link = new ToolBarButton(); - link.setLabel("Trifon Trifonov"); - link.setHref("http://www.adempiere.com/User:Trifonnt"); - link.setTarget("_blank"); - link.setParent(content); + row = new Row(); + row.setParent(rows); + row.appendCellChild(addLink("Low Heng Sin", "http://www.adempiere.com/User:Hengsin")); + row.appendCellChild(addLink("Carlos Ruiz", "http://wiki.idempiere.org/en/User:CarlosRuiz")); + row = new Row(); + row.setParent(rows); + row.appendCellChild(addLink("Hiep Lq", "http://wiki.idempiere.org/en/User:Hieplq")); + row.appendCellChild(addLink("Nicolas Micoud", "http://wiki.idempiere.org/en/User:Nmicoud")); + row = new Row(); + row.setParent(rows); + row.appendCellChild(addLink("Jan Thielemann", "http://wiki.idempiere.org/en/User:Jan.thielemann")); + row.appendCellChild(addLink("Redhuan D. Oon", "http://www.red1.org")); + row = new Row(); + row.setParent(rows); + row.appendCellChild(addLink("Thomas Bayen", "http://wiki.idempiere.org/en/User:TBayen")); + row.appendCellChild(addLink("Ashley G Ramdass", "http://www.adempiere.com/User:Agramdass")); + row = new Row(); + row.setParent(rows); + row.appendCellChild(addLink("Teo Sarca", "http://www.adempiere.com/User:Teo_sarca")); + row.appendCellChild(addLink("Trifon Trifonov", "http://www.adempiere.com/User:Trifonnt")); return tabPanel; } + private ToolBarButton addLink(String label, String href) { + ToolBarButton link = new ToolBarButton(); + link.setLabel(label); + link.setHref(href); + link.setTarget("_blank"); + return link; + } + protected Tabpanel createAbout() { Tabpanel tabPanel = new Tabpanel(); @@ -475,14 +467,6 @@ public class AboutWindow extends Window implements EventListener { separator.setParent(vbox); ToolBarButton link = new ToolBarButton(); link.setLabel("Project Site"); - link.setHref("http://www.idempiere.com"); - link.setTarget("_blank"); - link.setParent(vbox); - - separator = new Separator(); - separator.setParent(vbox); - link = new ToolBarButton(); - link.setLabel("Community Site"); link.setHref("http://www.idempiere.org"); link.setTarget("_blank"); link.setParent(vbox); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewerProvider.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewerProvider.java index 5d4c78d9d7..42ffaaa0f0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewerProvider.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewerProvider.java @@ -3,11 +3,11 @@ package org.adempiere.webui.window; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JasperPrint; +import org.adempiere.report.jasper.JRViewerProvider; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.component.Window; import org.adempiere.webui.part.WindowContainer; import org.adempiere.webui.session.SessionManager; -import org.compiere.report.JRViewerProvider; public class ZkJRViewerProvider implements JRViewerProvider { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index af0e7c703d..a47dcced8c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -598,7 +598,7 @@ public class ZkReportViewer extends Window implements EventListener, ITab // fill Report Options String sql = MRole.getDefault().addAccessSQL( - "SELECT AD_PrintFormat_ID, Name, Description " + "SELECT * " + "FROM AD_PrintFormat " + "WHERE AD_Table_ID=? " //Added Lines by Armen @@ -619,7 +619,9 @@ public class ZkReportViewer extends Window implements EventListener, ITab rs = pstmt.executeQuery(); while (rs.next()) { - KeyNamePair pp = new KeyNamePair(rs.getInt(1), rs.getString(2)); + MPrintFormat printFormat = new MPrintFormat (Env.getCtx(), rs, null); + + KeyNamePair pp = new KeyNamePair(printFormat.get_ID(), printFormat.get_Translation(MPrintFormat.COLUMNNAME_Name)); Listitem li = comboReport.appendItem(pp.getName(), pp.getKey()); if (rs.getInt(1) == AD_PrintFormat_ID) { diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/adwindow.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/adwindow.css.dsp index 380639c3c7..e6f6aded3b 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/adwindow.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/adwindow.css.dsp @@ -147,6 +147,23 @@ background-color: #D3D3D3; } +.adwindow-detailpane-adtab-grid-south { + background-color: transparent; + position: absolute; + right: 0px; + top: 0px; + height: 24px; +} + +.adwindow-detailpane-adtab-grid-south .z-paging { + padding: 0px !important; +} + +.adwindow-detailpane-adtab-grid-south .z-paging .z-paging-inp { + height: 16px; + line-height: 16px; +} + .adwindow-gridview-detail { height: 200px; } diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/desktop.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/desktop.css.dsp index 17e0dc7457..320b67b365 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/desktop.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/desktop.css.dsp @@ -27,6 +27,19 @@ font-size: 10px; } +.desktop-header-popup { + width: 800px; + border-radius: 3px; + border: 1px solid #d5d5d5; + border-right: 2px solid #d5d5d5; + border-bottom-width: 2px; + right: 1px; +} + +.desktop-header-popup .desktop-header { + border: none; +} + .desktop-header-username { padding-right: 6px; } diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/grid.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/grid.css.dsp index 64aed58e9c..9e866e8004 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/grid.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/grid.css.dsp @@ -33,6 +33,10 @@ background-image: none !important; } +div.z-column-cnt, div.z-grid-header div.z-auxheader-cnt { + padding: 4px 2px 3px; +} + <%-- text overflow for grid cell --%> .z-cell > span.z-label { overflow: hidden; diff --git a/org.adempiere.ui.zk/theme/default/images/threelines.png b/org.adempiere.ui.zk/theme/default/images/threelines.png new file mode 100644 index 0000000000..385136b371 Binary files /dev/null and b/org.adempiere.ui.zk/theme/default/images/threelines.png differ diff --git a/org.adempiere.webstore/META-INF/MANIFEST.MF b/org.adempiere.webstore/META-INF/MANIFEST.MF index 0eca6532e1..0b044e227f 100644 --- a/org.adempiere.webstore/META-INF/MANIFEST.MF +++ b/org.adempiere.webstore/META-INF/MANIFEST.MF @@ -3,8 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.adempiere.webstore Bundle-SymbolicName: org.adempiere.webstore;singleton:=true Bundle-Version: 2.0.0.qualifier -Require-Bundle: org.adempiere.report.jasper;bundle-version="2.0.0", - org.adempiere.base;bundle-version="2.0.0", +Require-Bundle: org.adempiere.base;bundle-version="2.0.0", org.adempiere.report.jasper.webapp;bundle-version="2.0.0", org.eclipse.jdt.core.compiler.batch;bundle-version="3.8.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.6 diff --git a/org.idempiere.webservices/META-INF/MANIFEST.MF b/org.idempiere.webservices/META-INF/MANIFEST.MF index c86118946a..b2233a1996 100644 --- a/org.idempiere.webservices/META-INF/MANIFEST.MF +++ b/org.idempiere.webservices/META-INF/MANIFEST.MF @@ -18,6 +18,9 @@ Import-Package: javax.activation;version="1.1.1", javax.xml.rpc.server, javax.xml.rpc.soap, javax.xml.soap;version="1.3.0", + net.sf.jasperreports.engine, + net.sf.jasperreports.engine.base, + net.sf.jasperreports.engine.util, org.apache.commons.codec.binary, org.apache.commons.logging;version="1.1.1", org.apache.commons.logging.impl;version="1.1.1", @@ -57,7 +60,6 @@ Import-Package: javax.activation;version="1.1.1", org.apache.xml.serialize;version="2.9.0", org.osgi.framework;version="1.6.0" Require-Bundle: org.adempiere.base;bundle-version="2.0.0", - org.adempiere.report.jasper.library;bundle-version="2.0.0", org.adempiere.ui;bundle-version="2.0.0", org.apache.ecs;bundle-version="1.0.0" Bundle-ClassPath: .,