IDEMPIERE-4858 : CreateTable process (#774)

* IDEMPIERE-4858 : CreateTable process

* IDEMPIERE-4858 : CreateTable process - fixes

Changes following Carlos's remarks - see details in the ticket

Co-Authored-By: Carlos Ruiz <carg67@gmail.com>

* IDEMPIERE-4858 : CreateTable process - fixes migration scripts

See details in ticket

Co-Authored-By: Carlos Ruiz <carg67@gmail.com>

* IDEMPIERE-4858 : CreateTable process - various fixes

fix migration scripts names / constants in uppercase / remove check of table length

* IDEMPIERE-4858 : CreateTable process - various fixes

default value for EntityType param / replace numeric name/value params by boolean ones / enhance creation of system element (name/print name/description)
see https://idempiere.atlassian.net/browse/IDEMPIERE-4858?focusedCommentId=47325

* IDEMPIERE-4858 : CreateTable process : optional columns

* IDEMPIERE-4858 : CreateTable process : remove wrong temporary migration scripts

* IDEMPIERE-4858 : CreateTable process :

add org.adempiere.base.process as required plugin (and not as imported package)
add missing content on migration scripts

* IDEMPIERE-4858 : CreateTable process : fixes / reordering / renaming

Failed creating Description column: ** Fill mandatory fields: : Length
Value and DocumentNo are not usually mandatory
Some minor reordering and renaming of variables

Co-Authored-By: Carlos Ruiz <carg67@gmail.com>

* IDEMPIERE-4858 : CreateTable process : can be used to add columns on existing table

Co-Authored-By: Carlos Ruiz <carg67@gmail.com>

* IDEMPIERE-4858 : CreateTable process - fix default value for TableName parameter

Co-Authored-By: Carlos Ruiz <carg67@gmail.com>

* IDEMPIERE-4858 : CreateTable process  - restore default value for Description, Name and AccessLevel parameters

Co-Authored-By: Carlos Ruiz <carg67@gmail.com>

Co-authored-by: Carlos Ruiz <carg67@gmail.com>
This commit is contained in:
Nicolas Micoud 2021-07-23 15:37:22 +02:00 committed by GitHub
parent 1a01a70b2b
commit a4dfd191ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1426 additions and 1 deletions

View File

@ -0,0 +1,359 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Jul 8, 2021, 8:22:01 AM CEST
INSERT INTO AD_Process (AD_Process_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,IsReport,Value,IsDirectPrint,Classname,AccessLevel,EntityType,Statistic_Count,Statistic_Seconds,IsBetaFunctionality,ShowHelp,CopyFromProcess,AD_Process_UU,AllowMultipleExecution) VALUES (200134,0,0,'Y',TO_DATE('2021-07-08 08:22:00','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:22:00','YYYY-MM-DD HH24:MI:SS'),0,'Create Table','N','CreateTable','N','org.idempiere.process.CreateTable','4','D',0,0,'N','Y','N','7920ec21-56c0-4d97-9047-fc97e0f2f562','P')
;
-- Jul 8, 2021, 8:22:41 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200354,0,0,'Y',TO_DATE('2021-07-08 08:22:40','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:22:40','YYYY-MM-DD HH24:MI:SS'),0,'DB Table Name','Name of the table in the database','The DB Table Name indicates the name of the table in database.',200134,10,10,'N',27,'Y','TableName','Y','D',587,'fd9df7a7-10a5-40aa-a738-3acbd94934f3','N','N')
;
-- Jul 8, 2021, 8:22:58 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200355,0,0,'Y',TO_DATE('2021-07-08 08:22:57','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:22:57','YYYY-MM-DD HH24:MI:SS'),0,'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.',200134,20,10,'N',0,'N','Name','Y','D',469,'88868426-9b38-4166-aa17-4b5fd1d70759','N','N')
;
-- Jul 8, 2021, 8:23:09 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200356,0,0,'Y',TO_DATE('2021-07-08 08:23:08','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:23:08','YYYY-MM-DD HH24:MI:SS'),0,'Description','Optional short description of the record','A description is limited to 255 characters.',200134,30,10,'N',0,'N','Description','Y','D',275,'9589d825-1777-425e-827a-68f2643dbea2','N','N')
;
-- Jul 8, 2021, 8:23:26 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,AD_Reference_Value_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200357,0,0,'Y',TO_DATE('2021-07-08 08:23:26','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:23:26','YYYY-MM-DD HH24:MI:SS'),0,'Data Access Level','Access Level required','Indicates the access level required for this record or process.',200134,40,17,5,'N',0,'Y','AccessLevel','Y','D',145,'3d340ca9-6a2c-4e5a-8593-4acddb1902c6','N','N')
;
-- Jul 8, 2021, 8:23:39 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,AD_Reference_Value_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200358,0,0,'Y',TO_DATE('2021-07-08 08:23:39','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:23:39','YYYY-MM-DD HH24:MI:SS'),0,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200134,50,18,389,'N',0,'Y','EntityType','Y','D',1682,'4954083e-5856-4fc9-85bb-a187d9e12af4','N','N')
;
-- Jul 8, 2021, 8:24:00 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,Placeholder,IsAutocomplete) VALUES (200359,0,0,'Y',TO_DATE('2021-07-08 08:23:59','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:23:59','YYYY-MM-DD HH24:MI:SS'),0,'Length of Value Column',200134,60,11,'N',0,'N','ValueLength','N','D','890ece13-6f2c-4757-b175-63b1358fd89f','N','Leave empty if not needed','N')
;
-- Jul 8, 2021, 8:24:11 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,Placeholder,IsAutocomplete) VALUES (200360,0,0,'Y',TO_DATE('2021-07-08 08:24:11','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:24:11','YYYY-MM-DD HH24:MI:SS'),0,'Length of Name Column',200134,70,11,'N',0,'N','NameLength','N','D','65bd630e-40b1-40ec-8e19-49da03fe239f','N','Leave empty if not needed','N')
;
-- Jul 8, 2021, 8:24:33 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete,ReadOnlyLogic) VALUES (200361,0,0,'Y',TO_DATE('2021-07-08 08:24:32','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:24:32','YYYY-MM-DD HH24:MI:SS'),0,'Create KeyColumn',200134,80,20,'N',0,'N','Y','IsCreateKeyColumn','N','D','372a15e7-cc49-41cc-811d-cac11e446057','N','N', '1=1')
;
-- Jul 8, 2021, 8:24:48 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200362,0,0,'Y',TO_DATE('2021-07-08 08:24:48','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:24:48','YYYY-MM-DD HH24:MI:SS'),0,'Create a Workflow',200134,90,20,'N',0,'N','N','IsCreateWorkflow','N','D','4927153b-5408-4565-939f-7352a37dea43','N','N')
;
-- Jul 8, 2021, 8:25:04 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200363,0,0,'Y',TO_DATE('2021-07-08 08:25:04','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:25:04','YYYY-MM-DD HH24:MI:SS'),0,'Create a Translation Table',200134,100,20,'N',0,'N','N','IsCreateTranslationTable','N','D','af1cbfdf-d1e3-441e-86ad-4b7ba6b35c0b','N','N')
;
-- Jul 8, 2021, 8:25:41 AM CEST
INSERT INTO AD_Menu (AD_Menu_ID,Name,Action,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,AD_Process_ID,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,AD_Menu_UU) VALUES (200194,'Create Table','P',0,0,'Y',TO_DATE('2021-07-08 08:25:41','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-08 08:25:41','YYYY-MM-DD HH24:MI:SS'),0,'N',200134,'Y','N','D','Y','bb9dd54f-09a4-4056-9ceb-d2d4ecae39f6')
;
-- Jul 8, 2021, 8:25:41 AM CEST
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', getDate(), 0, getDate(), 0,t.AD_Tree_ID, 200194, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200194)
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=0, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200145
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=1, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200142
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=2, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=53203
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=3, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=586
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=4, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=138
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=5, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200194
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=6, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=139
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=7, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200065
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=8, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200063
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=9, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=249
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=10, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=141
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=11, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=300
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=12, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=589
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=13, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200000
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=14, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=295
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=15, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=216
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=16, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=140
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=17, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=142
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=18, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=53012
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=19, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=143
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=20, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=201
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=21, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=176
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=22, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200072
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=23, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=53086
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=24, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=239
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=26, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=517
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=27, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=499
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=28, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200150
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=29, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200174
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=30, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=53089
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=31, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=53090
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=32, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200038
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=33, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200143
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=34, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=200141
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=35, Updated=getDate() WHERE AD_Tree_ID=10 AND Node_ID=50001
;
-- Jul 20, 2021, 2:55:13 PM CEST
UPDATE AD_Process_Para SET DefaultValue='@SQL=select get_sysconfig(''DEFAULT_ENTITYTYPE'',''U'',0,0) from dual',Updated=TO_DATE('2021-07-20 14:55:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200358
;
-- Jul 20, 2021, 2:56:00 PM CEST
UPDATE AD_Process_Para SET Name='Create ''Value'' column', AD_Reference_ID=20, IsMandatory='Y', DefaultValue='Y', ColumnName='IsCreateColValue', Placeholder=NULL,Updated=TO_DATE('2021-07-20 14:56:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200359
;
-- Jul 20, 2021, 2:56:18 PM CEST
UPDATE AD_Process_Para SET Name='Create ''Name'' column', AD_Reference_ID=20, DefaultValue='Y', ColumnName='IsCreateColName', Placeholder=NULL,Updated=TO_DATE('2021-07-20 14:56:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200360
;
-- Jul 20, 2021, 2:56:42 PM CEST
UPDATE AD_Process_Para SET SeqNo=999,Updated=TO_DATE('2021-07-20 14:56:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200359
;
-- Jul 20, 2021, 2:56:46 PM CEST
UPDATE AD_Process_Para SET SeqNo=9999,Updated=TO_DATE('2021-07-20 14:56:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200360
;
-- Jul 20, 2021, 2:56:50 PM CEST
UPDATE AD_Process_Para SET SeqNo=60,Updated=TO_DATE('2021-07-20 14:56:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200361
;
-- Jul 20, 2021, 2:56:52 PM CEST
UPDATE AD_Process_Para SET SeqNo=70,Updated=TO_DATE('2021-07-20 14:56:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200362
;
-- Jul 20, 2021, 2:56:55 PM CEST
UPDATE AD_Process_Para SET SeqNo=80,Updated=TO_DATE('2021-07-20 14:56:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200363
;
-- Jul 20, 2021, 2:56:57 PM CEST
UPDATE AD_Process_Para SET SeqNo=90,Updated=TO_DATE('2021-07-20 14:56:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200359
;
-- Jul 20, 2021, 2:56:59 PM CEST
UPDATE AD_Process_Para SET SeqNo=100,Updated=TO_DATE('2021-07-20 14:56:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200360
;
-- Jul 20, 2021, 3:24:57 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200364,0,0,'Y',TO_DATE('2021-07-20 15:24:57','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:24:57','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Description'' column',200134,110,20,'N',0,'N','Y','IsCreateColDescription','N','D','7e942d0b-47fd-4442-8d29-48b4587adf42','N','N')
;
-- Jul 20, 2021, 3:25:11 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200365,0,0,'Y',TO_DATE('2021-07-20 15:25:11','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:25:11','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Help'' column',200134,120,20,'N',0,'N','Y','IsCreateColHelp','N','D','c4fcfdef-5363-4bcd-8de7-716242a0ea9b','N','N')
;
-- Jul 20, 2021, 3:25:23 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200366,0,0,'Y',TO_DATE('2021-07-20 15:25:22','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:25:22','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DocumentNo'' column',200134,130,20,'N',0,'N','N','IsCreateColDocumentNo','N','D','545b1499-3d88-4f28-a919-aa4de11c7f5b','N','N')
;
-- Jul 20, 2021, 3:25:35 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200367,0,0,'Y',TO_DATE('2021-07-20 15:25:35','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:25:35','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DocAction'' column',200134,140,20,'N',0,'N','N','IsCreateColDocAction','N','D','c71da134-4b3c-4ddd-91bc-2d235a6973cc','N','N')
;
-- Jul 20, 2021, 3:25:45 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200368,0,0,'Y',TO_DATE('2021-07-20 15:25:44','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:25:44','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DocStatus'' column',200134,150,20,'N',0,'N','N','IsCreateColDocStatus','N','D','fa6f4c61-6cad-46b6-a11b-14fbab2eb39d','N','N')
;
-- Jul 20, 2021, 3:25:53 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200369,0,0,'Y',TO_DATE('2021-07-20 15:25:53','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:25:53','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Processed'' column',200134,160,20,'N',0,'N','N','IsCreateColProcessed','N','D','9859451e-5c4e-4e0f-a663-d5f8463dc8c6','N','N')
;
-- Jul 20, 2021, 3:26:02 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200370,0,0,'Y',TO_DATE('2021-07-20 15:26:02','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:26:02','YYYY-MM-DD HH24:MI:SS'),0,'Create ''ProcessedOn'' column',200134,170,20,'N',0,'N','N','IsCreateColProcessedOn','N','D','1819ed86-c467-4052-b84b-cbbd46e3bb18','N','N')
;
-- Jul 20, 2021, 3:26:11 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200371,0,0,'Y',TO_DATE('2021-07-20 15:26:11','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:26:11','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Processing'' column',200134,180,20,'N',0,'N','N','IsCreateColProcessing','N','D','f9f26c01-30de-4eab-b2f9-f19975b4278b','N','N')
;
-- Jul 20, 2021, 3:26:22 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200372,0,0,'Y',TO_DATE('2021-07-20 15:26:21','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:26:21','YYYY-MM-DD HH24:MI:SS'),0,'Create ''C_DocTypeTarget_ID'' column',200134,190,20,'N',0,'N','N','IsCreateColC_DocTypeTarget_ID','N','D','51a57984-1a2b-4e18-b36a-8cc8fe300dea','N','N')
;
-- Jul 20, 2021, 3:26:30 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200373,0,0,'Y',TO_DATE('2021-07-20 15:26:30','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:26:30','YYYY-MM-DD HH24:MI:SS'),0,'Create ''C_DocType_ID'' column',200134,200,20,'N',0,'N','N','IsCreateColC_DocType_ID','N','D','ce0b0d61-db59-4595-8d10-1a399d93f708','N','N')
;
-- Jul 20, 2021, 3:26:39 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200374,0,0,'Y',TO_DATE('2021-07-20 15:26:39','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:26:39','YYYY-MM-DD HH24:MI:SS'),0,'Create ''C_Currency_ID'' column',200134,210,20,'N',0,'N','N','IsCreateColC_Currency_ID','N','D','104e29c4-06d9-4926-b887-f2321ae1bed7','N','N')
;
-- Jul 20, 2021, 3:26:47 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200375,0,0,'Y',TO_DATE('2021-07-20 15:26:47','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:26:47','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DateTrx'' column',200134,220,20,'N',0,'N','N','IsCreateColDateTrx','N','D','8e93af3c-c5f7-42b4-b8bc-6436421f8ed8','N','N')
;
-- Jul 20, 2021, 3:26:55 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200376,0,0,'Y',TO_DATE('2021-07-20 15:26:55','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:26:55','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DateAcct'' column',200134,230,20,'N',0,'N','N','IsCreateColDateAcct','N','D','a27f9a81-194f-457e-a535-7c7d6ba58473','N','N')
;
-- Jul 20, 2021, 3:27:04 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200377,0,0,'Y',TO_DATE('2021-07-20 15:27:04','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:27:04','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Posted'' column',200134,240,20,'N',0,'N','N','IsCreateColPosted','N','D','790453eb-7c27-45de-a6cd-96b56fcc37bb','N','N')
;
-- Jul 20, 2021, 3:27:14 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200378,0,0,'Y',TO_DATE('2021-07-20 15:27:14','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:27:14','YYYY-MM-DD HH24:MI:SS'),0,'Create ''IsApproved'' column',200134,250,20,'N',0,'N','N','IsCreateColIsApproved','N','D','9410f400-7785-43c2-9a7b-1eb676c42295','N','N')
;
-- Jul 20, 2021, 3:27:24 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200379,0,0,'Y',TO_DATE('2021-07-20 15:27:23','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:27:23','YYYY-MM-DD HH24:MI:SS'),0,'Create ''SalesRep_ID'' column',200134,260,20,'N',0,'N','N','IsCreateColSalesRep_ID','N','D','561fca18-19e0-44f8-b530-bc3a2e3adedf','N','N')
;
-- Jul 20, 2021, 3:27:34 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200380,0,0,'Y',TO_DATE('2021-07-20 15:27:34','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-07-20 15:27:34','YYYY-MM-DD HH24:MI:SS'),0,'Create ''AD_User_ID'' column',200134,270,20,'N',0,'N','N','IsCreateColAD_User_ID','N','D','017601cc-3f7b-4492-8b9f-b71c632224dd','N','N')
;
-- Jul 21, 2021, 4:31:09 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_DATE('2021-07-21 16:31:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200367
;
-- Jul 21, 2021, 4:31:15 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_DATE('2021-07-21 16:31:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200368
;
-- Jul 21, 2021, 4:31:17 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_DATE('2021-07-21 16:31:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200369
;
-- Jul 21, 2021, 4:31:19 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_DATE('2021-07-21 16:31:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200370
;
-- Jul 21, 2021, 4:31:21 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_DATE('2021-07-21 16:31:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200371
;
-- Jul 21, 2021, 5:21:47 PM CEST
INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,AD_ToolBarButton_ID,Name,Updated,UpdatedBy,IsCustomization,AD_ToolBarButton_UU,Action,AD_Tab_ID,AD_Process_ID,DisplayLogic,SeqNo,EntityType) VALUES (0,0,TO_DATE('2021-07-21 17:21:47','YYYY-MM-DD HH24:MI:SS'),100,'Create Table','Y',200114,'Create Table',TO_DATE('2021-07-21 17:21:47','YYYY-MM-DD HH24:MI:SS'),100,'N','f9537ff0-2389-47d6-afa3-0d864a34eb8d','W',100,200134,'@IsView@=N',30,'D')
;
-- Jul 21, 2021, 5:23:36 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',DefaultValue='@TableName@',Updated=TO_DATE('2021-07-21 17:23:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200354
;
-- Jul 21, 2021, 5:23:59 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',Updated=TO_DATE('2021-07-21 17:23:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200355
;
-- Jul 21, 2021, 5:24:09 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',DefaultValue='@Description@',Updated=TO_DATE('2021-07-21 17:24:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200356
;
-- Jul 21, 2021, 5:24:13 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',DefaultValue='@Name@',Updated=TO_DATE('2021-07-21 17:24:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200355
;
-- Jul 21, 2021, 5:24:24 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',DefaultValue='@AccessLevel@',Updated=TO_DATE('2021-07-21 17:24:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200357
;
-- Jul 21, 2021, 7:10:05 PM CEST
UPDATE AD_Process SET Name='Create/Complete Table',Updated=TO_DATE('2021-07-21 19:10:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200134
;
-- Jul 21, 2021, 7:10:05 PM CEST
UPDATE AD_Menu SET Name='Create/Complete Table', Description=NULL, IsActive='Y',Updated=TO_DATE('2021-07-21 19:10:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=200194
;
SELECT register_migration_script('202107080800_IDEMPIERE-4858.sql') FROM dual
;

View File

@ -0,0 +1,356 @@
-- Jul 8, 2021, 8:22:01 AM CEST
INSERT INTO AD_Process (AD_Process_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,IsReport,Value,IsDirectPrint,Classname,AccessLevel,EntityType,Statistic_Count,Statistic_Seconds,IsBetaFunctionality,ShowHelp,CopyFromProcess,AD_Process_UU,AllowMultipleExecution) VALUES (200134,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:22:00','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:22:00','YYYY-MM-DD HH24:MI:SS'),0,'Create Table','N','CreateTable','N','org.idempiere.process.CreateTable','4','D',0,0,'N','Y','N','7920ec21-56c0-4d97-9047-fc97e0f2f562','P')
;
-- Jul 8, 2021, 8:22:41 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200354,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:22:40','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:22:40','YYYY-MM-DD HH24:MI:SS'),0,'DB Table Name','Name of the table in the database','The DB Table Name indicates the name of the table in database.',200134,10,10,'N',27,'Y','TableName','Y','D',587,'fd9df7a7-10a5-40aa-a738-3acbd94934f3','N','N')
;
-- Jul 8, 2021, 8:22:58 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200355,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:22:57','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:22:57','YYYY-MM-DD HH24:MI:SS'),0,'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.',200134,20,10,'N',0,'N','Name','Y','D',469,'88868426-9b38-4166-aa17-4b5fd1d70759','N','N')
;
-- Jul 8, 2021, 8:23:09 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200356,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:23:08','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:23:08','YYYY-MM-DD HH24:MI:SS'),0,'Description','Optional short description of the record','A description is limited to 255 characters.',200134,30,10,'N',0,'N','Description','Y','D',275,'9589d825-1777-425e-827a-68f2643dbea2','N','N')
;
-- Jul 8, 2021, 8:23:26 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,AD_Reference_Value_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200357,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:23:26','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:23:26','YYYY-MM-DD HH24:MI:SS'),0,'Data Access Level','Access Level required','Indicates the access level required for this record or process.',200134,40,17,5,'N',0,'Y','AccessLevel','Y','D',145,'3d340ca9-6a2c-4e5a-8593-4acddb1902c6','N','N')
;
-- Jul 8, 2021, 8:23:39 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,AD_Reference_Value_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200358,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:23:39','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:23:39','YYYY-MM-DD HH24:MI:SS'),0,'Entity Type','Dictionary Entity Type; Determines ownership and synchronization','The Entity Types "Dictionary", "iDempiere" and "Application" might be automatically synchronized and customizations deleted or overwritten.
For customizations, copy the entity and select "User"!',200134,50,18,389,'N',0,'Y','EntityType','Y','D',1682,'4954083e-5856-4fc9-85bb-a187d9e12af4','N','N')
;
-- Jul 8, 2021, 8:24:00 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,Placeholder,IsAutocomplete) VALUES (200359,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:23:59','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:23:59','YYYY-MM-DD HH24:MI:SS'),0,'Length of Value Column',200134,60,11,'N',0,'N','ValueLength','N','D','890ece13-6f2c-4757-b175-63b1358fd89f','N','Leave empty if not needed','N')
;
-- Jul 8, 2021, 8:24:11 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,Placeholder,IsAutocomplete) VALUES (200360,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:24:11','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:24:11','YYYY-MM-DD HH24:MI:SS'),0,'Length of Name Column',200134,70,11,'N',0,'N','NameLength','N','D','65bd630e-40b1-40ec-8e19-49da03fe239f','N','Leave empty if not needed','N')
;
-- Jul 8, 2021, 8:24:33 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete,ReadOnlyLogic) VALUES (200361,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:24:32','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:24:32','YYYY-MM-DD HH24:MI:SS'),0,'Create KeyColumn',200134,80,20,'N',0,'N','Y','IsCreateKeyColumn','N','D','372a15e7-cc49-41cc-811d-cac11e446057','N','N', '1=1')
;
-- Jul 8, 2021, 8:24:48 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200362,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:24:48','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:24:48','YYYY-MM-DD HH24:MI:SS'),0,'Create a Workflow',200134,90,20,'N',0,'N','N','IsCreateWorkflow','N','D','4927153b-5408-4565-939f-7352a37dea43','N','N')
;
-- Jul 8, 2021, 8:25:04 AM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200363,0,0,'Y',TO_TIMESTAMP('2021-07-08 08:25:04','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:25:04','YYYY-MM-DD HH24:MI:SS'),0,'Create a Translation Table',200134,100,20,'N',0,'N','N','IsCreateTranslationTable','N','D','af1cbfdf-d1e3-441e-86ad-4b7ba6b35c0b','N','N')
;
-- Jul 8, 2021, 8:25:41 AM CEST
INSERT INTO AD_Menu (AD_Menu_ID,Name,"action",AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,AD_Process_ID,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,AD_Menu_UU) VALUES (200194,'Create Table','P',0,0,'Y',TO_TIMESTAMP('2021-07-08 08:25:41','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-08 08:25:41','YYYY-MM-DD HH24:MI:SS'),0,'N',200134,'Y','N','D','Y','bb9dd54f-09a4-4056-9ceb-d2d4ecae39f6')
;
-- Jul 8, 2021, 8:25:41 AM CEST
INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', statement_timestamp(), 0, statement_timestamp(), 0,t.AD_Tree_ID, 200194, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200194)
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=0, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200145
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=1, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200142
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=2, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53203
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=3, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=586
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=4, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=138
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=5, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200194
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=6, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=139
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=7, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200065
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=8, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200063
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=9, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=249
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=10, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=141
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=11, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=300
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=12, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=589
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=13, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200000
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=14, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=295
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=15, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=216
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=16, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=140
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=17, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=142
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=18, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53012
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=19, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=143
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=20, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=201
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=21, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=176
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=22, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200072
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=23, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53086
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=24, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=239
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=26, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=517
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=27, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=499
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=28, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200150
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=29, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200174
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=30, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53089
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=31, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53090
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=32, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200038
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=33, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200143
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=34, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200141
;
-- Jul 8, 2021, 8:26:45 AM CEST
UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=35, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=50001
;
-- Jul 20, 2021, 2:55:13 PM CEST
UPDATE AD_Process_Para SET DefaultValue='@SQL=select get_sysconfig(''DEFAULT_ENTITYTYPE'',''U'',0,0) from dual',Updated=TO_TIMESTAMP('2021-07-20 14:55:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200358
;
-- Jul 20, 2021, 2:56:00 PM CEST
UPDATE AD_Process_Para SET Name='Create ''Value'' column', AD_Reference_ID=20, IsMandatory='Y', DefaultValue='Y', ColumnName='IsCreateColValue', Placeholder=NULL,Updated=TO_TIMESTAMP('2021-07-20 14:56:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200359
;
-- Jul 20, 2021, 2:56:18 PM CEST
UPDATE AD_Process_Para SET Name='Create ''Name'' column', AD_Reference_ID=20, DefaultValue='Y', ColumnName='IsCreateColName', Placeholder=NULL,Updated=TO_TIMESTAMP('2021-07-20 14:56:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200360
;
-- Jul 20, 2021, 2:56:42 PM CEST
UPDATE AD_Process_Para SET SeqNo=999,Updated=TO_TIMESTAMP('2021-07-20 14:56:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200359
;
-- Jul 20, 2021, 2:56:46 PM CEST
UPDATE AD_Process_Para SET SeqNo=9999,Updated=TO_TIMESTAMP('2021-07-20 14:56:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200360
;
-- Jul 20, 2021, 2:56:50 PM CEST
UPDATE AD_Process_Para SET SeqNo=60,Updated=TO_TIMESTAMP('2021-07-20 14:56:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200361
;
-- Jul 20, 2021, 2:56:52 PM CEST
UPDATE AD_Process_Para SET SeqNo=70,Updated=TO_TIMESTAMP('2021-07-20 14:56:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200362
;
-- Jul 20, 2021, 2:56:55 PM CEST
UPDATE AD_Process_Para SET SeqNo=80,Updated=TO_TIMESTAMP('2021-07-20 14:56:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200363
;
-- Jul 20, 2021, 2:56:57 PM CEST
UPDATE AD_Process_Para SET SeqNo=90,Updated=TO_TIMESTAMP('2021-07-20 14:56:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200359
;
-- Jul 20, 2021, 2:56:59 PM CEST
UPDATE AD_Process_Para SET SeqNo=100,Updated=TO_TIMESTAMP('2021-07-20 14:56:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Process_Para_ID=200360
;
-- Jul 20, 2021, 3:24:57 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200364,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:24:57','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:24:57','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Description'' column',200134,110,20,'N',0,'N','Y','IsCreateColDescription','N','D','7e942d0b-47fd-4442-8d29-48b4587adf42','N','N')
;
-- Jul 20, 2021, 3:25:11 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200365,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:25:11','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:25:11','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Help'' column',200134,120,20,'N',0,'N','Y','IsCreateColHelp','N','D','c4fcfdef-5363-4bcd-8de7-716242a0ea9b','N','N')
;
-- Jul 20, 2021, 3:25:23 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200366,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:25:22','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:25:22','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DocumentNo'' column',200134,130,20,'N',0,'N','N','IsCreateColDocumentNo','N','D','545b1499-3d88-4f28-a919-aa4de11c7f5b','N','N')
;
-- Jul 20, 2021, 3:25:35 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200367,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:25:35','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:25:35','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DocAction'' column',200134,140,20,'N',0,'N','N','IsCreateColDocAction','N','D','c71da134-4b3c-4ddd-91bc-2d235a6973cc','N','N')
;
-- Jul 20, 2021, 3:25:45 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200368,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:25:44','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:25:44','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DocStatus'' column',200134,150,20,'N',0,'N','N','IsCreateColDocStatus','N','D','fa6f4c61-6cad-46b6-a11b-14fbab2eb39d','N','N')
;
-- Jul 20, 2021, 3:25:53 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200369,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:25:53','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:25:53','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Processed'' column',200134,160,20,'N',0,'N','N','IsCreateColProcessed','N','D','9859451e-5c4e-4e0f-a663-d5f8463dc8c6','N','N')
;
-- Jul 20, 2021, 3:26:02 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200370,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:26:02','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:26:02','YYYY-MM-DD HH24:MI:SS'),0,'Create ''ProcessedOn'' column',200134,170,20,'N',0,'N','N','IsCreateColProcessedOn','N','D','1819ed86-c467-4052-b84b-cbbd46e3bb18','N','N')
;
-- Jul 20, 2021, 3:26:11 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200371,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:26:11','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:26:11','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Processing'' column',200134,180,20,'N',0,'N','N','IsCreateColProcessing','N','D','f9f26c01-30de-4eab-b2f9-f19975b4278b','N','N')
;
-- Jul 20, 2021, 3:26:22 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200372,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:26:21','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:26:21','YYYY-MM-DD HH24:MI:SS'),0,'Create ''C_DocTypeTarget_ID'' column',200134,190,20,'N',0,'N','N','IsCreateColC_DocTypeTarget_ID','N','D','51a57984-1a2b-4e18-b36a-8cc8fe300dea','N','N')
;
-- Jul 20, 2021, 3:26:30 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200373,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:26:30','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:26:30','YYYY-MM-DD HH24:MI:SS'),0,'Create ''C_DocType_ID'' column',200134,200,20,'N',0,'N','N','IsCreateColC_DocType_ID','N','D','ce0b0d61-db59-4595-8d10-1a399d93f708','N','N')
;
-- Jul 20, 2021, 3:26:39 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200374,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:26:39','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:26:39','YYYY-MM-DD HH24:MI:SS'),0,'Create ''C_Currency_ID'' column',200134,210,20,'N',0,'N','N','IsCreateColC_Currency_ID','N','D','104e29c4-06d9-4926-b887-f2321ae1bed7','N','N')
;
-- Jul 20, 2021, 3:26:47 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200375,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:26:47','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:26:47','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DateTrx'' column',200134,220,20,'N',0,'N','N','IsCreateColDateTrx','N','D','8e93af3c-c5f7-42b4-b8bc-6436421f8ed8','N','N')
;
-- Jul 20, 2021, 3:26:55 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200376,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:26:55','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:26:55','YYYY-MM-DD HH24:MI:SS'),0,'Create ''DateAcct'' column',200134,230,20,'N',0,'N','N','IsCreateColDateAcct','N','D','a27f9a81-194f-457e-a535-7c7d6ba58473','N','N')
;
-- Jul 20, 2021, 3:27:04 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200377,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:27:04','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:27:04','YYYY-MM-DD HH24:MI:SS'),0,'Create ''Posted'' column',200134,240,20,'N',0,'N','N','IsCreateColPosted','N','D','790453eb-7c27-45de-a6cd-96b56fcc37bb','N','N')
;
-- Jul 20, 2021, 3:27:14 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200378,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:27:14','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:27:14','YYYY-MM-DD HH24:MI:SS'),0,'Create ''IsApproved'' column',200134,250,20,'N',0,'N','N','IsCreateColIsApproved','N','D','9410f400-7785-43c2-9a7b-1eb676c42295','N','N')
;
-- Jul 20, 2021, 3:27:24 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200379,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:27:23','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:27:23','YYYY-MM-DD HH24:MI:SS'),0,'Create ''SalesRep_ID'' column',200134,260,20,'N',0,'N','N','IsCreateColSalesRep_ID','N','D','561fca18-19e0-44f8-b530-bc3a2e3adedf','N','N')
;
-- Jul 20, 2021, 3:27:34 PM CEST
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,AD_Process_ID,SeqNo,AD_Reference_ID,IsRange,FieldLength,IsMandatory,DefaultValue,ColumnName,IsCentrallyMaintained,EntityType,AD_Process_Para_UU,IsEncrypted,IsAutocomplete) VALUES (200380,0,0,'Y',TO_TIMESTAMP('2021-07-20 15:27:34','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-07-20 15:27:34','YYYY-MM-DD HH24:MI:SS'),0,'Create ''AD_User_ID'' column',200134,270,20,'N',0,'N','N','IsCreateColAD_User_ID','N','D','017601cc-3f7b-4492-8b9f-b71c632224dd','N','N')
;
-- Jul 21, 2021, 4:31:09 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_TIMESTAMP('2021-07-21 16:31:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200367
;
-- Jul 21, 2021, 4:31:15 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_TIMESTAMP('2021-07-21 16:31:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200368
;
-- Jul 21, 2021, 4:31:17 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_TIMESTAMP('2021-07-21 16:31:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200369
;
-- Jul 21, 2021, 4:31:19 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_TIMESTAMP('2021-07-21 16:31:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200370
;
-- Jul 21, 2021, 4:31:21 PM CEST
UPDATE AD_Process_Para SET ReadOnlyLogic='@IsCreateWorkflow@=Y',Updated=TO_TIMESTAMP('2021-07-21 16:31:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200371
;
-- Jul 21, 2021, 5:21:47 PM CEST
INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,AD_ToolBarButton_ID,Name,Updated,UpdatedBy,IsCustomization,AD_ToolBarButton_UU,"action",AD_Tab_ID,AD_Process_ID,DisplayLogic,SeqNo,EntityType) VALUES (0,0,TO_TIMESTAMP('2021-07-21 17:21:47','YYYY-MM-DD HH24:MI:SS'),100,'Create Table','Y',200114,'Create Table',TO_TIMESTAMP('2021-07-21 17:21:47','YYYY-MM-DD HH24:MI:SS'),100,'N','f9537ff0-2389-47d6-afa3-0d864a34eb8d','W',100,200134,'@IsView@=N',30,'D')
;
-- Jul 21, 2021, 5:23:36 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',DefaultValue='@TableName@',Updated=TO_TIMESTAMP('2021-07-21 17:23:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200354
;
-- Jul 21, 2021, 5:23:59 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',Updated=TO_TIMESTAMP('2021-07-21 17:23:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200355
;
-- Jul 21, 2021, 5:24:09 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',DefaultValue='@Description@',Updated=TO_TIMESTAMP('2021-07-21 17:24:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200356
;
-- Jul 21, 2021, 5:24:13 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',DefaultValue='@Name@',Updated=TO_TIMESTAMP('2021-07-21 17:24:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200355
;
-- Jul 21, 2021, 5:24:24 PM CEST
UPDATE AD_Process_Para SET DisplayLogic='@AD_Table_ID@=0',DefaultValue='@AccessLevel@',Updated=TO_TIMESTAMP('2021-07-21 17:24:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200357
;
-- Jul 21, 2021, 7:10:05 PM CEST
UPDATE AD_Process SET Name='Create/Complete Table',Updated=TO_TIMESTAMP('2021-07-21 19:10:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200134
;
-- Jul 21, 2021, 7:10:05 PM CEST
UPDATE AD_Menu SET Name='Create/Complete Table', Description=NULL, IsActive='Y',Updated=TO_TIMESTAMP('2021-07-21 19:10:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=200194
;
SELECT register_migration_script('202107080800_IDEMPIERE-4858.sql') FROM dual
;

View File

@ -0,0 +1,650 @@
/***********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* 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., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Carlos Ruiz *
* - Nicolas Micoud (TGI) *
**********************************************************************/
package org.idempiere.process;
import static org.compiere.model.SystemIDs.REFERENCE_AD_LANGUAGE;
import static org.compiere.model.SystemIDs.REFERENCE_AD_USER;
import static org.compiere.model.SystemIDs.REFERENCE_AD_USER_SALESREP;
import static org.compiere.model.SystemIDs.REFERENCE_C_DOCTYPE;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_BUTTON;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_DATE;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_LIST;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_NUMBER;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_STRING;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLE;
import static org.compiere.model.SystemIDs.REFERENCE_DATATYPE_TABLEDIR;
import static org.compiere.model.SystemIDs.REFERENCE_DOCUMENTACTION;
import static org.compiere.model.SystemIDs.REFERENCE_DOCUMENTSTATUS;
import static org.compiere.model.SystemIDs.REFERENCE_POSTED;
import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.acct.Doc;
import org.compiere.model.MColumn;
import org.compiere.model.MProcess;
import org.compiere.model.MTable;
import org.compiere.model.M_Element;
import org.compiere.model.Query;
import org.compiere.model.X_AD_WF_Node;
import org.compiere.model.X_AD_Workflow;
import org.compiere.process.DocAction;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.SvrProcess;
import org.compiere.util.DisplayType;
import org.compiere.util.Util;
import org.compiere.wf.MWFNode;
import org.compiere.wf.MWFNodeNext;
import org.compiere.wf.MWorkflow;
/**
* IDEMPIERE-4858 - Create/Complete Table process
* @author Carlos Ruiz
* @author Nicolas Micoud - TGI
*/
public class CreateTable extends SvrProcess {
private String p_tableName = "";
private String p_name = "";
private String p_description = "";
private String p_accessLevel = "";
private String p_entityType = "";
private boolean p_isCreateKeyColumn = false;
private boolean p_isCreateWorkflow = false;
private boolean p_isCreateTranslationTable = false;
private boolean p_isCreateColValue = false;
private boolean p_isCreateColName = false;
private boolean p_isCreateColDescription = false;
private boolean p_isCreateColHelp = false;
private boolean p_isCreateColDocumentNo = false;
private boolean p_isCreateColDocAction = false;
private boolean p_isCreateColDocStatus = false;
private boolean p_isCreateColProcessed = false;
private boolean p_isCreateColProcessedOn = false;
private boolean p_isCreateColProcessing = false;
private boolean p_isCreateColC_DocTypeTarget_ID = false;
private boolean p_isCreateColC_DocType_ID = false;
private boolean p_isCreateColC_Currency_ID = false;
private boolean p_isCreateColDateTrx = false;
private boolean p_isCreateColDateAcct = false;
private boolean p_isCreateColPosted = false;
private boolean p_isCreateColIsApproved = false;
private boolean p_isCreateColSalesRepID = false;
private boolean p_isCreateColAD_User_ID = false;
private int p_record_ID = 0;
final private static int LENGTH_0 = 0;
final private static int LENGTH_1 = 1;
final private static int LENGTH_2 = 2;
final private static int LENGTH_6 = 6;
final private static int LENGTH_7 = 7;
final private static int LENGTH_20 = 20;
final private static int LENGTH_22 = 22;
final private static int LENGTH_30 = 30;
final private static int LENGTH_36 = 36;
final private static int LENGTH_40 = 40;
final private static int LENGTH_60 = 60;
final private static int LENGTH_255 = 255;
final private static int LENGTH_2000 = 2000;
final private static int WF_TRANSITION_10 = 10;
final private static int WF_TRANSITION_100 = 100;
public static final String[] WORKFLOW_COLUMNS = {"DocAction", "DocStatus", "Processed", "ProcessedOn", "Processing"};
/**
* Prepare - e.g., get Parameters.
*/
protected void prepare() {
for (ProcessInfoParameter para : getParameter()) {
String name = para.getParameterName();
switch (name) {
case "TableName":
p_tableName = para.getParameterAsString();
break;
case "Name":
p_name = para.getParameterAsString();
break;
case "Description":
p_description = para.getParameterAsString();
break;
case "AccessLevel":
p_accessLevel = para.getParameterAsString();
break;
case "EntityType":
p_entityType = para.getParameterAsString();
break;
case "IsCreateKeyColumn":
p_isCreateKeyColumn = para.getParameterAsBoolean();
break;
case "IsCreateWorkflow":
p_isCreateWorkflow = para.getParameterAsBoolean();
break;
case "IsCreateTranslationTable":
p_isCreateTranslationTable = para.getParameterAsBoolean();
break;
case "IsCreateColValue":
p_isCreateColValue = para.getParameterAsBoolean();
break;
case "IsCreateColName":
p_isCreateColName = para.getParameterAsBoolean();
break;
case "IsCreateColDescription":
p_isCreateColDescription = para.getParameterAsBoolean();
break;
case "IsCreateColHelp":
p_isCreateColHelp = para.getParameterAsBoolean();
break;
case "IsCreateColDocumentNo":
p_isCreateColDocumentNo = para.getParameterAsBoolean();
break;
case "IsCreateColDocAction":
p_isCreateColDocAction = para.getParameterAsBoolean();
break;
case "IsCreateColDocStatus":
p_isCreateColDocStatus = para.getParameterAsBoolean();
break;
case "IsCreateColProcessed":
p_isCreateColProcessed = para.getParameterAsBoolean();
break;
case "IsCreateColProcessedOn":
p_isCreateColProcessedOn = para.getParameterAsBoolean();
break;
case "IsCreateColProcessing":
p_isCreateColProcessing = para.getParameterAsBoolean();
break;
case "IsCreateColC_DocTypeTarget_ID":
p_isCreateColC_DocTypeTarget_ID = para.getParameterAsBoolean();
break;
case "IsCreateColC_DocType_ID":
p_isCreateColC_DocType_ID = para.getParameterAsBoolean();
break;
case "IsCreateColC_Currency_ID":
p_isCreateColC_Currency_ID = para.getParameterAsBoolean();
break;
case "IsCreateColDateTrx":
p_isCreateColDateTrx = para.getParameterAsBoolean();
break;
case "IsCreateColDateAcct":
p_isCreateColDateAcct = para.getParameterAsBoolean();
break;
case "IsCreateColPosted":
p_isCreateColPosted = para.getParameterAsBoolean();
break;
case "IsCreateColIsApproved":
p_isCreateColIsApproved = para.getParameterAsBoolean();
break;
case "IsCreateColSalesRep_ID":
p_isCreateColSalesRepID = para.getParameterAsBoolean();
break;
case "IsCreateColAD_User_ID":
p_isCreateColAD_User_ID = para.getParameterAsBoolean();
break;
default:
if (log.isLoggable(Level.INFO)) log.log(Level.INFO, "Custom Parameter: " + name + "=" + para.getInfo());
}
}
p_record_ID = getRecord_ID();
} // prepare
/**
* Perform process.
* @return Message
* @throws Exception
*/
protected String doIt() {
if (!p_isCreateKeyColumn && p_isCreateTranslationTable)
return ("@Error@ Main table must have a key column if you want to handle translations");
if (Util.isEmpty(p_name))
p_name = p_tableName;
MTable table = createTable(false);
M_Element elementID = null;
if (p_isCreateKeyColumn) {
elementID = M_Element.get(getCtx(), p_tableName + "_ID");
if (elementID == null) { // Create Element <TableName> + _ID
elementID = new M_Element(getCtx(), p_tableName + "_ID", p_entityType, get_TrxName());
elementID.setName(p_name);
elementID.setPrintName(p_name);
elementID.setDescription(p_description);
elementID.saveEx();
}
createColumn(table, elementID.getColumnName());
}
M_Element elementUU = M_Element.get(getCtx(), p_tableName + "_UU");
if (elementUU == null) { // Create Element <TableName> + _UU
elementUU = new M_Element(getCtx(), p_tableName + "_UU", p_entityType, get_TrxName());
elementUU.saveEx();
}
createColumn(table, elementUU.getColumnName());
if (p_isCreateColValue)
createColumn(table, "Value");
if (p_isCreateColName)
createColumn(table, "Name");
if (p_isCreateColDescription)
createColumn(table, "Description");
if (p_isCreateColHelp)
createColumn(table, "Help");
// Optional columns
if (p_isCreateColDateTrx)
createColumn(table, "DateTrx");
if (p_isCreateColDateAcct)
createColumn(table, "DateAcct");
if (p_isCreateColC_DocTypeTarget_ID)
createColumn(table, "C_DocTypeTarget_ID");
if (p_isCreateColC_DocType_ID)
createColumn(table, "C_DocType_ID");
if (p_isCreateColDocumentNo)
createColumn(table, "DocumentNo");
if (p_isCreateColSalesRepID)
createColumn(table, "SalesRep_ID");
if (p_isCreateColAD_User_ID)
createColumn(table, "AD_User_ID");
if (p_isCreateColC_Currency_ID)
createColumn(table, "C_Currency_ID");
if (p_isCreateColIsApproved)
createColumn(table, "IsApproved");
if (p_isCreateColPosted)
createColumn(table, "Posted");
// Mandatory workflow columns
if (p_isCreateColDocAction || p_isCreateWorkflow)
createColumn(table, "DocAction");
if (p_isCreateColDocStatus || p_isCreateWorkflow)
createColumn(table, "DocStatus");
if (p_isCreateColProcessed || p_isCreateWorkflow)
createColumn(table, "Processed");
if (p_isCreateColProcessedOn || p_isCreateWorkflow)
createColumn(table, "ProcessedOn");
if (p_isCreateColProcessing || p_isCreateWorkflow)
createColumn(table, "Processing");
if (p_isCreateWorkflow) {
MWorkflow wf = createWorkflow(table);
MProcess process = new Query(getCtx(), MProcess.Table_Name, "AD_Workflow_ID=?", get_TrxName())
.setParameters(wf.getAD_Workflow_ID())
.first();
if (process == null) {
process = new MProcess(getCtx(), 0, get_TrxName());
process.setValue(p_tableName + " Process");
process.setName("Process " + p_name);
process.setEntityType(p_entityType);
process.setAccessLevel(p_accessLevel);
process.setAD_Workflow_ID(wf.getAD_Workflow_ID());
process.saveEx();
}
MColumn colDocAction = getColumn(table, "DocAction");
colDocAction.setAD_Process_ID(process.getAD_Process_ID());
colDocAction.saveEx();
}
if (p_isCreateTranslationTable) {
MTable tableTrl = createTable(true);
if (elementID != null)
createColumn(tableTrl, elementID.getColumnName()); // <TableName>_ID (ID of parent table)
M_Element elementTrlUU = M_Element.get(getCtx(), tableTrl.getTableName() + "_UU");
if (elementTrlUU == null) {
elementTrlUU = new M_Element(getCtx(), tableTrl.getTableName() + "_UU", p_entityType, get_TrxName());
elementTrlUU.saveEx();
}
createColumn(tableTrl, elementTrlUU.getColumnName()); // <TableName>_Trl_UU
createColumn(tableTrl, "AD_Language");
createColumn(tableTrl, "IsTranslated");
if (p_isCreateColName)
createColumn(tableTrl, "Name");
if (p_isCreateColDescription)
createColumn(tableTrl, "Description");
if (p_isCreateColHelp)
createColumn(tableTrl, "Help");
}
return "@ProcessOK@";
}
/**
* Get a column based on tableID and columnName - read from DB not cache
* @param table
* @param columnName
* @return MColumn or null if it doesn't exist
*/
private MColumn getColumn(MTable table, String columnName) {
return new Query(getCtx(), MColumn.Table_Name, "AD_Table_ID=? AND UPPER(ColumnName)=UPPER(?)", get_TrxName())
.setParameters(table.getAD_Table_ID(), columnName)
.first();
}
/**
* Log information about the table
* @param table
*/
private void log(MTable table) {
addLog(table.getAD_Table_ID(), null, null, table.getTableName(), MTable.Table_ID, table.getAD_Table_ID());
}
/**
* Create table and 7 mandatory columns if not exists
* @param trl - if the table to create is translation
* @return MTable
*/
private MTable createTable(boolean trl) {
String tableName = p_tableName + (trl ? "_Trl" : "");
MTable table = new Query(getCtx(), MTable.Table_Name, "UPPER(TableName)=UPPER(?)", get_TrxName())
.setParameters(tableName)
.first();
if (table == null) {
String name = p_name + (trl ? " Trl" : "");
String description = null;
if (!Util.isEmpty(p_description))
description = p_description + (trl ? " Trl" : "");
table = new MTable(getCtx(), 0, get_TrxName());
table.setTableName(tableName);
table.setName(name);
table.setDescription(description);
table.setEntityType(p_entityType);
table.setAccessLevel(p_accessLevel);
table.setIsDeleteable(trl ? false : true);
table.setIsChangeLog(true);
table.saveEx();
log(table);
} else {
if (p_record_ID == 0 && !trl) {
throw new AdempiereException("Table " + p_tableName + " already exists");
}
}
// Mandatory columns
createColumn(table, "AD_Client_ID");
createColumn(table, "AD_Org_ID");
createColumn(table, "Created");
createColumn(table, "CreatedBy");
createColumn(table, "Updated");
createColumn(table, "UpdatedBy");
createColumn(table, "IsActive");
return table;
}
/**
* Create a column if it doesn't exist
* @param table
* @param columnName
*/
private void createColumn(MTable table, String columnName) {
if (getColumn(table, columnName) != null)
return;
MColumn column = new MColumn(table);
M_Element element = M_Element.get(getCtx(), columnName, get_TrxName());
column.setColumnName(element.getColumnName());
column.setName(element.getName());
column.setDescription(element.getDescription());
column.setHelp(element.getHelp());
column.setAD_Element_ID(element.getAD_Element_ID());
if (columnName.equals("AD_Client_ID")) {
column.setAD_Reference_ID(DisplayType.Search);
column.setDefaultValue("@#AD_Client_ID@");
column.setIsMandatory(true);
column.setIsUpdateable(false);
column.setReadOnlyLogic("1=1");
}
else if (columnName.equals("AD_Org_ID")) {
column.setAD_Reference_ID(DisplayType.TableDir);
column.setDefaultValue("@AD_Org_ID@");
column.setIsMandatory(true);
column.setIsUpdateable(false);
}
else if (columnName.equals("Created") || columnName.equals("Updated")) {
column.setAD_Reference_ID(DisplayType.DateTime);
column.setIsMandatory(true);
column.setIsUpdateable(false);
}
else if (columnName.equals("CreatedBy") || columnName.equals("UpdatedBy")) {
column.setAD_Reference_ID(DisplayType.Search);
column.setAD_Reference_Value_ID(REFERENCE_AD_USER);
column.setIsMandatory(true);
column.setIsUpdateable(false);
}
else if (columnName.equals("IsActive") || columnName.equals("IsTranslated") || columnName.equals("Processed") || columnName.equals("Processing") || columnName.equals("IsApproved")) {
column.setAD_Reference_ID(DisplayType.YesNo);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_1);
column.setDefaultValue("N");
if (columnName.equals("IsActive"))
column.setDefaultValue("Y");
}
else if (columnName.equals("AD_Language")) {
column.setAD_Reference_ID(DisplayType.Table);
column.setAD_Reference_Value_ID(REFERENCE_AD_LANGUAGE);
column.setIsMandatory(true);
column.setIsUpdateable(false);
column.setFieldLength(LENGTH_6);
column.setIsParent(true);
}
else if (columnName.equals("Value") || columnName.equals("Name") || columnName.equals("DocumentNo")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_STRING);
column.setIsUpdateable(true);
column.setIsSelectionColumn(true);
int length = LENGTH_0;
if (columnName.equals("Value"))
length = LENGTH_40;
else if (columnName.equals("Name")) {
length = LENGTH_60;
column.setIsMandatory(true);
column.setIsIdentifier(true);
if (p_isCreateTranslationTable && !table.getTableName().toUpperCase().endsWith("_TRL"))
column.setIsTranslated(true);
}
else if (columnName.equals("DocumentNo"))
length = LENGTH_30;
column.setFieldLength(length);
}
else if (columnName.equals("Description") || columnName.equals("Help")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_STRING);
column.setIsUpdateable(true);
int length = LENGTH_0;
if (columnName.equals("Description"))
length = LENGTH_255;
else if (columnName.equals("Help"))
length = LENGTH_2000;
column.setFieldLength(length);
if (p_isCreateTranslationTable && !table.getTableName().toUpperCase().endsWith("_TRL"))
column.setIsTranslated(true);
}
else if (columnName.equals("C_Currency_ID")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_TABLEDIR);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_22);
column.setDefaultValue("@C_Currency_ID@");
}
else if (columnName.equals("DateAcct") || columnName.equals("DateTrx")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_DATE);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_7);
column.setDefaultValue("@#Date@");
}
else if (columnName.equals("DocAction")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_BUTTON);
column.setAD_Reference_Value_ID(REFERENCE_DOCUMENTACTION);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_2);
column.setDefaultValue(DocAction.ACTION_Complete);
column.setIsToolbarButton(MColumn.ISTOOLBARBUTTON_Window);
}
else if (columnName.equals("DocStatus")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_LIST);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_2);
column.setAD_Reference_Value_ID(REFERENCE_DOCUMENTSTATUS);
column.setDefaultValue(DocAction.STATUS_Drafted);
}
else if (columnName.equals("ProcessedOn")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_NUMBER);
column.setFieldLength(LENGTH_20);
}
else if (columnName.equals("C_DocType_ID")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_TABLEDIR);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_22);
}
else if (columnName.equals("C_DocTypeTarget_ID")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_TABLE);
column.setAD_Reference_Value_ID(REFERENCE_C_DOCTYPE);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_22);
}
else if (columnName.equals("Posted")) {
column.setAD_Reference_ID(REFERENCE_DATATYPE_BUTTON);
column.setIsMandatory(true);
column.setIsUpdateable(true);
column.setFieldLength(LENGTH_1);
column.setAD_Reference_Value_ID(REFERENCE_POSTED);
column.setDefaultValue(Doc.STATUS_NotPosted);
column.setIsToolbarButton(MColumn.ISTOOLBARBUTTON_Window);
}
else if (columnName.equals("AD_User_ID") || columnName.equals("SalesRep_ID")) {
column.setAD_Reference_ID(DisplayType.Search);
column.setAD_Reference_Value_ID(REFERENCE_AD_USER);
column.setIsMandatory(true);
column.setIsUpdateable(true);
if (columnName.equals("SalesRep_ID"))
column.setAD_Reference_Value_ID(REFERENCE_AD_USER_SALESREP);
}
else if (element.getColumnName().equalsIgnoreCase(table.getTableName() + "_ID")) { // key column
column.setIsKey(true);
column.setAD_Reference_ID(DisplayType.ID); // ID
column.setIsMandatory(true);
column.setFieldLength(LENGTH_22);
}
else if (element.getColumnName().equalsIgnoreCase(table.getTableName() + "_UU")) { // UUID column
column.setAD_Reference_ID(REFERENCE_DATATYPE_STRING);
column.setFieldLength(LENGTH_36);
}
else if (element.getColumnName().equalsIgnoreCase((table.getTableName().substring(0, table.getTableName().length()-4)) + "_ID")) { // ID of parent table (for translation tables)
column.setAD_Reference_ID(DisplayType.Search);
column.setIsParent(true);
column.setIsMandatory(true);
}
column.saveEx();
}
/**
* Create a workflow if it doesn't exist
* @param table
* @return MWorkflow
*/
private MWorkflow createWorkflow(MTable table) {
MWorkflow wf = new Query(getCtx(), MWorkflow.Table_Name, "WorkflowType=? AND AD_Table_ID=?", get_TrxName())
.setParameters(X_AD_Workflow.WORKFLOWTYPE_DocumentProcess, table.getAD_Table_ID())
.first();
if (wf != null)
return wf;
wf = new MWorkflow(getCtx(), 0, get_TrxName());
wf.setValue("Process_" + p_tableName);
wf.setName("Process_" + p_tableName);
wf.setWorkflowType(X_AD_Workflow.WORKFLOWTYPE_DocumentProcess);
wf.setAD_Table_ID(table.getAD_Table_ID());
wf.setEntityType(p_entityType);
wf.setAuthor("iDempiere");
wf.saveEx();
// Nodes
MWFNode docAuto = createWorkflowNode(wf, "DocAuto", X_AD_WF_Node.ACTION_DocumentAction, X_AD_WF_Node.DOCACTION_None);
MWFNode docComplete = createWorkflowNode(wf, "DocComplete", X_AD_WF_Node.ACTION_DocumentAction, X_AD_WF_Node.DOCACTION_Complete);
MWFNode docPrepare = createWorkflowNode(wf, "DocPrepare", X_AD_WF_Node.ACTION_DocumentAction, X_AD_WF_Node.DOCACTION_Prepare);
MWFNode start = createWorkflowNode(wf, "Start", X_AD_WF_Node.ACTION_WaitSleep, null);
// Transitions
createWorkflowNodeNext(start, docPrepare.getAD_WF_Node_ID(), WF_TRANSITION_10, "(Standard Approval)", true);
createWorkflowNodeNext(start, docAuto.getAD_WF_Node_ID(), WF_TRANSITION_100, "(Standard Transition)", false);
createWorkflowNodeNext(docPrepare, docComplete.getAD_WF_Node_ID(), WF_TRANSITION_100, "(Standard Transition)", false);
wf.setAD_WF_Node_ID(start.getAD_WF_Node_ID());
wf.saveEx();
return wf;
}
/**
* Create a workflow node
* @param wf
* @param name
* @param action
* @param docAction
* @return MWFNode
*/
private MWFNode createWorkflowNode(MWorkflow wf, String name, String action, String docAction) {
MWFNode wfn = new MWFNode(wf, "(" + name + ")", "(" + name + ")");
wfn.setDescription("(Standard Node)");
wfn.setEntityType(p_entityType);
wfn.setAction(action);
wfn.setDocAction(docAction);
wfn.saveEx();
return wfn;
}
/**
* Create a workflow transition
* @param wfn
* @param nodeNextID
* @param seq
* @param description
* @param isStdUserWF
*/
private void createWorkflowNodeNext(MWFNode wfn, int nodeNextID, int seq, String description, boolean isStdUserWF) {
MWFNodeNext wfnn = new MWFNodeNext(wfn, nodeNextID);
wfnn.setSeqNo(seq);
wfnn.setDescription(description);
wfnn.setIsStdUserWorkflow(isStdUserWF);
wfnn.setEntityType(p_entityType);
wfnn.saveEx();
}
} // CreateTable

View File

@ -146,8 +146,11 @@ public class SystemIDs
public final static int REFERENCE_DATATYPE_YES_NO = 20;
public final static int REFERENCE_ACCOUNT = 175;
public final static int REFERENCE_AD_LANGUAGE = 106;
public final static int REFERENCE_AD_USER = 110;
public final static int REFERENCE_AD_USER_SALESREP = 190;
public final static int REFERENCE_ASSIGNMENT = 200181;
public final static int REFERENCE_C_DOCTYPE = 170;
public final static int REFERENCE_CHART = 200183;
public final static int REFERENCE_DOCUMENTACTION = 135;
public final static int REFERENCE_DOCUMENTSTATUS = 131;

View File

@ -180,7 +180,8 @@ Require-Bundle: org.adempiere.base;bundle-version="0.0.0",
com.itextpdf;bundle-version="0.0.0",
org.atmosphere.runtime;bundle-version="0.0.0",
zkwebfragment,
com.sun.activation.jakarta.activation;bundle-version="1.2.1"
com.sun.activation.jakarta.activation;bundle-version="1.2.1",
org.adempiere.base.process
Bundle-Activator: org.adempiere.webui.WebUIActivator
Eclipse-ExtensibleAPI: true
Web-ContextPath: webui

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.adempiere.webui.process.CreateTableParameterListener">
<implementation class="org.adempiere.webui.process.CreateTableParameterListener"/>
<property name="ProcessClass" type="String" value="org.idempiere.process.CreateTable"/>
<property name="ColumnName" type="String" value="IsCreateWorkflow"/>
<service>
<provide interface="org.adempiere.webui.apps.IProcessParameterListener"/>
</service>
</scr:component>

View File

@ -0,0 +1,47 @@
/**********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* 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., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Nicolas Micoud (TGI) *
**********************************************************************/
package org.adempiere.webui.process;
import org.adempiere.webui.apps.IProcessParameterListener;
import org.adempiere.webui.apps.ProcessParameterPanel;
import org.adempiere.webui.editor.WEditor;
import org.idempiere.process.CreateTable;
public class CreateTableParameterListener implements IProcessParameterListener {
@Override
public void onChange(ProcessParameterPanel parameterPanel, String columnName, WEditor editor) {
if (editor.getValue() != null) {
if ("IsCreateWorkflow".equals(columnName) && !editor.isNullOrEmpty() && (Boolean) editor.getValue()) {
for (String column : CreateTable.WORKFLOW_COLUMNS) {
WEditor param = parameterPanel.getEditor("IsCreateCol" + column);
if (param != null)
param.setValue(true);
}
}
}
}
}