hg merge release-5.1 (merge release5.1 into default)
This commit is contained in:
commit
ed891d0c71
|
@ -0,0 +1,15 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-2970 Display URL in the Record info panel
|
||||
-- Dec 12, 2015 2:00:57 PM COT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Permalink',0,0,'Y',TO_DATE('2015-12-12 14:00:57','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-12-12 14:00:57','YYYY-MM-DD HH24:MI:SS'),100,200369,'Permalink','D','df044d1d-59d8-4d56-85ef-66c459cf45ea')
|
||||
;
|
||||
|
||||
-- Dec 12, 2015 2:02:04 PM COT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Right click and copy link for a permanent link to this record.',0,0,'Y',TO_DATE('2015-12-12 14:02:03','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-12-12 14:02:03','YYYY-MM-DD HH24:MI:SS'),100,200370,'Permalink_tooltip','D','cec80265-768c-495c-be62-1a321d356c3c')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201512121402_IDEMPIERE-2970.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Jun 22, 2017 5:41:04 PM CEST
|
||||
-- Automatic Packin
|
||||
INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Updated,Value,Description,AD_SysConfig_UU,IsActive,Name,Created,AD_Org_ID,CreatedBy,UpdatedBy,AD_Client_ID,EntityType) VALUES (200101,'S',TO_DATE('2017-06-22 17:41:03','YYYY-MM-DD HH24:MI:SS'),'120','Delay in seconds to start applying the external automatic packin - see AUTOMATIC_PACKIN_FOLDERS','7db52ef2-ce9e-4989-b583-b64429fca5c8','Y','AUTOMATIC_PACKIN_INITIAL_DELAY',TO_DATE('2017-06-22 17:41:03','YYYY-MM-DD HH24:MI:SS'),0,100,100,0,'D')
|
||||
;
|
||||
|
||||
-- Jun 22, 2017 5:44:09 PM CEST
|
||||
INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Updated,Value,Description,AD_SysConfig_UU,IsActive,Name,Created,AD_Org_ID,CreatedBy,UpdatedBy,AD_Client_ID,EntityType) VALUES (200102,'S',TO_DATE('2017-06-22 17:44:09','YYYY-MM-DD HH24:MI:SS'),' ','List of folders separated by semicolon (;) - allowed is .zip file or folder containing .zip files (recursive) - filename notation yyyymmddHHMM_ClientValue_InformationalDescription.zip','5468245a-0bb1-4357-b293-2ffb81c7cf2d','Y','AUTOMATIC_PACKIN_FOLDERS',TO_DATE('2017-06-22 17:44:09','YYYY-MM-DD HH24:MI:SS'),0,100,100,0,'D')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201706221744_AutomaticExternalPackin.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3486 add default logic for customize and vendor parameter
|
||||
-- Sep 13, 2017 9:25:06 PM ICT
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx@',Updated=TO_DATE('2017-09-13 21:25:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200036
|
||||
;
|
||||
|
||||
-- Sep 13, 2017 9:25:14 PM ICT
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT CASE ''@IsSOTrx@'' WHEN '''' THEN '''' WHEN ''N'' THEN ''Y'' ELSE ''N'' END AS DefaultValue FROM DUAL',Updated=TO_DATE('2017-09-13 21:25:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200037
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201709131604_IDEMPIERE-3486.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,34 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3532 - Remove hardcoded values for InfoInvoiceWindow (BPartnerID / IsSOTrx) and InfoPaymentWindow (IsSOTrx)
|
||||
-- Oct 27, 2017 5:16:11 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@C_BPartner_ID@',Updated=TO_DATE('2017-10-27 17:16:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200052
|
||||
;
|
||||
|
||||
-- Oct 27, 2017 5:16:25 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx:Y@',Updated=TO_DATE('2017-10-27 17:16:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200066
|
||||
;
|
||||
|
||||
-- Oct 27, 2017 5:17:29 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx:Y@',Updated=TO_DATE('2017-10-27 17:17:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200085
|
||||
;
|
||||
|
||||
-- Nov 8, 2017 11:04:30 AM CET
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@C_BPartner_ID@',Updated=TO_DATE('2017-11-08 11:04:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200039
|
||||
;
|
||||
|
||||
-- Nov 8, 2017 11:04:58 AM CET
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx:Y@',Updated=TO_DATE('2017-11-08 11:04:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200051
|
||||
;
|
||||
|
||||
-- Nov 8, 2017 11:05:07 AM CET
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx:Y@',Updated=TO_DATE('2017-11-08 11:05:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200078
|
||||
;
|
||||
|
||||
-- Nov 8, 2017 11:07:22 AM CET
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT CASE ''@BaseTable_ID:0@'' WHEN ''335'' THEN ''N'' ELSE '''' END AS DefaultValue FROM DUAL',Updated=TO_DATE('2017-11-08 11:07:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200065
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710271720_IDEMPIERE-3532.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,26 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3546 - Use specific messages for range process parameters placeholder
|
||||
-- Nov 6, 2017 4:07:29 PM CET
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','From',0,0,'Y',TO_DATE('2017-11-06 16:07:28','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2017-11-06 16:07:28','YYYY-MM-DD HH24:MI:SS'),0,200438,'ProcessParameterRangeFrom','D','44852250-153e-462a-b206-897d0c2cd1ab')
|
||||
;
|
||||
|
||||
-- Nov 6, 2017 4:07:42 PM CET
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','To',0,0,'Y',TO_DATE('2017-11-06 16:07:42','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2017-11-06 16:07:42','YYYY-MM-DD HH24:MI:SS'),0,200439,'ProcessParameterRangeTo','D','07220887-ecb2-42e9-9665-260041080b52')
|
||||
;
|
||||
|
||||
INSERT INTO ad_message_trl
|
||||
(ad_message_id, ad_language, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, msgtext, msgtip, istranslated, ad_message_trl_uu)
|
||||
SELECT 200438, ad_language, ad_client_id, ad_org_id, isactive, SysDate, 100, SysDate, 100, msgtext, msgtip, istranslated, generate_uuid()
|
||||
FROM ad_message_trl
|
||||
WHERE ad_message_id=280;
|
||||
|
||||
INSERT INTO ad_message_trl
|
||||
(ad_message_id, ad_language, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, msgtext, msgtip, istranslated, ad_message_trl_uu)
|
||||
SELECT 200439, ad_language, ad_client_id, ad_org_id, isactive, SysDate, 100, SysDate, 100, msgtext, msgtip, istranslated, generate_uuid()
|
||||
FROM ad_message_trl
|
||||
WHERE ad_message_id=565;
|
||||
|
||||
SELECT register_migration_script('201711061600_IDEMPIERE-3546.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,31 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3547 Mismatches in oracle foreign keys delete rule
|
||||
-- Nov 6, 2017 4:21:15 PM CET
|
||||
ALTER TABLE C_OrderLine DROP CONSTRAINT linkorderline_corderline
|
||||
;
|
||||
|
||||
-- Nov 6, 2017 4:21:15 PM CET
|
||||
ALTER TABLE C_OrderLine ADD CONSTRAINT linkorderline_corderline FOREIGN KEY (Link_OrderLine_ID) REFERENCES c_orderline(c_orderline_id) DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Nov 6, 2017 4:21:26 PM CET
|
||||
ALTER TABLE A_Asset_Acct DROP CONSTRAINT aasset_aassetacct
|
||||
;
|
||||
|
||||
-- Nov 6, 2017 4:21:26 PM CET
|
||||
ALTER TABLE A_Asset_Acct ADD CONSTRAINT aasset_aassetacct FOREIGN KEY (A_Asset_ID) REFERENCES a_asset(a_asset_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
-- Nov 6, 2017 4:21:36 PM CET
|
||||
ALTER TABLE A_Asset_Group_Acct DROP CONSTRAINT aassetgroup_aassetgroupacct
|
||||
;
|
||||
|
||||
-- Nov 6, 2017 4:21:36 PM CET
|
||||
ALTER TABLE A_Asset_Group_Acct ADD CONSTRAINT aassetgroup_aassetgroupacct FOREIGN KEY (A_Asset_Group_ID) REFERENCES a_asset_group(a_asset_group_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201711061621_IDEMPIERE-3547.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-905 Post-it functionality
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_Element SET ColumnName='AD_PostIt_ID',Updated=TO_DATE('2017-11-07 15:09:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203056
|
||||
;
|
||||
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_Column SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056
|
||||
;
|
||||
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_Process_Para SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL, AD_Element_ID=203056 WHERE UPPER(ColumnName)='AD_POSTIT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
|
||||
;
|
||||
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_Process_Para SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_InfoColumn SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201711071510_IDEMPIERE-905.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
-- IDEMPIERE-2970 Display URL in the Record info panel
|
||||
-- Dec 12, 2015 2:00:57 PM COT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Permalink',0,0,'Y',TO_TIMESTAMP('2015-12-12 14:00:57','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-12-12 14:00:57','YYYY-MM-DD HH24:MI:SS'),100,200369,'Permalink','D','df044d1d-59d8-4d56-85ef-66c459cf45ea')
|
||||
;
|
||||
|
||||
-- Dec 12, 2015 2:02:04 PM COT
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Right click and copy link for a permanent link to this record.',0,0,'Y',TO_TIMESTAMP('2015-12-12 14:02:03','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-12-12 14:02:03','YYYY-MM-DD HH24:MI:SS'),100,200370,'Permalink_tooltip','D','cec80265-768c-495c-be62-1a321d356c3c')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201512121402_IDEMPIERE-2970.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
-- Jun 22, 2017 5:41:04 PM CEST
|
||||
-- Automatic Packin
|
||||
INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Updated,Value,Description,AD_SysConfig_UU,IsActive,Name,Created,AD_Org_ID,CreatedBy,UpdatedBy,AD_Client_ID,EntityType) VALUES (200101,'S',TO_TIMESTAMP('2017-06-22 17:41:03','YYYY-MM-DD HH24:MI:SS'),'120','Delay in seconds to start applying the external automatic packin - see AUTOMATIC_PACKIN_FOLDERS','7db52ef2-ce9e-4989-b583-b64429fca5c8','Y','AUTOMATIC_PACKIN_INITIAL_DELAY',TO_TIMESTAMP('2017-06-22 17:41:03','YYYY-MM-DD HH24:MI:SS'),0,100,100,0,'D')
|
||||
;
|
||||
|
||||
-- Jun 22, 2017 5:44:09 PM CEST
|
||||
INSERT INTO AD_SysConfig (AD_SysConfig_ID,ConfigurationLevel,Updated,Value,Description,AD_SysConfig_UU,IsActive,Name,Created,AD_Org_ID,CreatedBy,UpdatedBy,AD_Client_ID,EntityType) VALUES (200102,'S',TO_TIMESTAMP('2017-06-22 17:44:09','YYYY-MM-DD HH24:MI:SS'),' ','List of folders separated by semicolon (;) - allowed is .zip file or folder containing .zip files (recursive) - filename notation yyyymmddHHMM_ClientValue_InformationalDescription.zip','5468245a-0bb1-4357-b293-2ffb81c7cf2d','Y','AUTOMATIC_PACKIN_FOLDERS',TO_TIMESTAMP('2017-06-22 17:44:09','YYYY-MM-DD HH24:MI:SS'),0,100,100,0,'D')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201706221744_AutomaticExternalPackin.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
-- IDEMPIERE-3486 add default logic for customize and vendor parameter
|
||||
-- Sep 13, 2017 9:25:06 PM ICT
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx@',Updated=TO_TIMESTAMP('2017-09-13 21:25:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200036
|
||||
;
|
||||
|
||||
-- Sep 13, 2017 9:25:14 PM ICT
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT CASE ''@IsSOTrx@'' WHEN '''' THEN '''' WHEN ''N'' THEN ''Y'' ELSE ''N'' END AS DefaultValue FROM DUAL',Updated=TO_TIMESTAMP('2017-09-13 21:25:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200037
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201709131604_IDEMPIERE-3486.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,31 @@
|
|||
-- IDEMPIERE-3532 - Remove hardcoded values for InfoInvoiceWindow (BPartnerID / IsSOTrx) and InfoPaymentWindow (IsSOTrx)
|
||||
-- Oct 27, 2017 5:16:12 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@C_BPartner_ID@',Updated=TO_TIMESTAMP('2017-10-27 17:16:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200052
|
||||
;
|
||||
|
||||
-- Oct 27, 2017 5:16:25 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx:Y@',Updated=TO_TIMESTAMP('2017-10-27 17:16:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200066
|
||||
;
|
||||
|
||||
-- Oct 27, 2017 5:17:29 PM CEST
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx:Y@',Updated=TO_TIMESTAMP('2017-10-27 17:17:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_InfoColumn_ID=200085
|
||||
;
|
||||
|
||||
-- Nov 8, 2017 11:04:30 AM CET
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@C_BPartner_ID@',Updated=TO_TIMESTAMP('2017-11-08 11:04:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200039
|
||||
;
|
||||
|
||||
-- Nov 8, 2017 11:04:58 AM CET
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx:Y@',Updated=TO_TIMESTAMP('2017-11-08 11:04:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200051
|
||||
;
|
||||
|
||||
-- Nov 8, 2017 11:05:07 AM CET
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@IsSOTrx:Y@',Updated=TO_TIMESTAMP('2017-11-08 11:05:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200078
|
||||
;
|
||||
|
||||
-- Nov 8, 2017 11:07:22 AM CET
|
||||
UPDATE AD_InfoColumn SET DefaultValue='@SQL=SELECT CASE ''@BaseTable_ID:0@'' WHEN ''335'' THEN ''N'' ELSE '''' END AS DefaultValue FROM DUAL',Updated=TO_TIMESTAMP('2017-11-08 11:07:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_InfoColumn_ID=200065
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710271720_IDEMPIERE-3532.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,23 @@
|
|||
-- IDEMPIERE-3546 - Use specific messages for range process parameters placeholder
|
||||
-- Nov 6, 2017 4:07:29 PM CET
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','From',0,0,'Y',TO_TIMESTAMP('2017-11-06 16:07:28','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2017-11-06 16:07:28','YYYY-MM-DD HH24:MI:SS'),0,200438,'ProcessParameterRangeFrom','D','44852250-153e-462a-b206-897d0c2cd1ab')
|
||||
;
|
||||
|
||||
-- Nov 6, 2017 4:07:42 PM CET
|
||||
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','To',0,0,'Y',TO_TIMESTAMP('2017-11-06 16:07:42','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2017-11-06 16:07:42','YYYY-MM-DD HH24:MI:SS'),0,200439,'ProcessParameterRangeTo','D','07220887-ecb2-42e9-9665-260041080b52')
|
||||
;
|
||||
|
||||
INSERT INTO ad_message_trl
|
||||
(ad_message_id, ad_language, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, msgtext, msgtip, istranslated, ad_message_trl_uu)
|
||||
SELECT 200438, ad_language, ad_client_id, ad_org_id, isactive, statement_timestamp(), 100, statement_timestamp(), 100, msgtext, msgtip, istranslated, generate_uuid()
|
||||
FROM ad_message_trl
|
||||
WHERE ad_message_id=280;
|
||||
|
||||
INSERT INTO ad_message_trl
|
||||
(ad_message_id, ad_language, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, msgtext, msgtip, istranslated, ad_message_trl_uu)
|
||||
SELECT 200439, ad_language, ad_client_id, ad_org_id, isactive, statement_timestamp(), 100, statement_timestamp(), 100, msgtext, msgtip, istranslated, generate_uuid()
|
||||
FROM ad_message_trl
|
||||
WHERE ad_message_id=565;
|
||||
|
||||
SELECT register_migration_script('201711061600_IDEMPIERE-3546.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,6 @@
|
|||
-- IDEMPIERE-3547 Mismatches in oracle foreign keys delete rule
|
||||
-- Not necessary in postgresql, just for oracle
|
||||
|
||||
SELECT register_migration_script('201711061621_IDEMPIERE-3547.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
-- IDEMPIERE-905 Post-it functionality
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_Element SET ColumnName='AD_PostIt_ID',Updated=TO_TIMESTAMP('2017-11-07 15:09:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=203056
|
||||
;
|
||||
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_Column SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056
|
||||
;
|
||||
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_Process_Para SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL, AD_Element_ID=203056 WHERE UPPER(ColumnName)='AD_POSTIT_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
|
||||
;
|
||||
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_Process_Para SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
-- Nov 7, 2017 3:09:53 PM CET
|
||||
UPDATE AD_InfoColumn SET ColumnName='AD_PostIt_ID', Name='Post-it', Description=NULL, Help=NULL WHERE AD_Element_ID=203056 AND IsCentrallyMaintained='Y'
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201711071510_IDEMPIERE-905.sql') FROM dual
|
||||
;
|
||||
|
|
@ -62,14 +62,14 @@ public interface I_AD_PostIt
|
|||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_Postit_ID */
|
||||
public static final String COLUMNNAME_AD_Postit_ID = "AD_Postit_ID";
|
||||
/** Column name AD_PostIt_ID */
|
||||
public static final String COLUMNNAME_AD_PostIt_ID = "AD_PostIt_ID";
|
||||
|
||||
/** Set Post-it */
|
||||
public void setAD_Postit_ID (int AD_Postit_ID);
|
||||
public void setAD_PostIt_ID (int AD_PostIt_ID);
|
||||
|
||||
/** Get Post-it */
|
||||
public int getAD_Postit_ID();
|
||||
public int getAD_PostIt_ID();
|
||||
|
||||
/** Column name AD_PostIt_UU */
|
||||
public static final String COLUMNNAME_AD_PostIt_UU = "AD_PostIt_UU";
|
||||
|
|
|
@ -42,7 +42,7 @@ public class MSysConfig extends X_AD_SysConfig
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7805174199114873428L;
|
||||
private static final long serialVersionUID = -4917976995339273240L;
|
||||
|
||||
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
||||
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
||||
|
@ -59,10 +59,12 @@ public class MSysConfig extends X_AD_SysConfig
|
|||
public static final String APPLICATION_MAIN_VERSION = "APPLICATION_MAIN_VERSION";
|
||||
public static final String APPLICATION_MAIN_VERSION_SHOWN = "APPLICATION_MAIN_VERSION_SHOWN";
|
||||
public static final String APPLICATION_OS_INFO_SHOWN = "APPLICATION_OS_INFO_SHOWN";
|
||||
public static final String AUTOMATIC_PACKIN_PROCESSING = "AUTOMATIC_PACKIN_PROCESSING";
|
||||
public static final String AUTOMATIC_PACKIN_TIMEOUT = "AUTOMATIC_PACKIN_TIMEOUT";
|
||||
public static final String AUTOMATIC_PACKIN_RETRIES = "AUTOMATIC_PACKIN_RETRIES";
|
||||
public static final String ATTACH_EMBEDDED_2PACK = "ATTACH_EMBEDDED_2PACK";
|
||||
public static final String AUTOMATIC_PACKIN_FOLDERS = "AUTOMATIC_PACKIN_FOLDERS";
|
||||
public static final String AUTOMATIC_PACKIN_INITIAL_DELAY = "AUTOMATIC_PACKIN_INITIAL_DELAY";
|
||||
public static final String AUTOMATIC_PACKIN_PROCESSING = "AUTOMATIC_PACKIN_PROCESSING";
|
||||
public static final String AUTOMATIC_PACKIN_RETRIES = "AUTOMATIC_PACKIN_RETRIES";
|
||||
public static final String AUTOMATIC_PACKIN_TIMEOUT = "AUTOMATIC_PACKIN_TIMEOUT";
|
||||
public static final String BACKGROUND_JOB_ALLOWED = "BACKGROUND_JOB_ALLOWED";
|
||||
public static final String BACKGROUND_JOB_BY_DEFAULT = "BACKGROUND_JOB_BY_DEFAULT";
|
||||
public static final String BACKGROUND_JOB_MAX_IN_SYSTEM = "BACKGROUND_JOB_MAX_IN_SYSTEM";
|
||||
|
@ -151,8 +153,8 @@ public class MSysConfig extends X_AD_SysConfig
|
|||
public static final String ZK_BROWSER_TITLE = "ZK_BROWSER_TITLE";
|
||||
public static final String ZK_BUTTON_STYLE = "ZK_BUTTON_STYLE";
|
||||
public static final String ZK_DASHBOARD_CALENDAR_REQUEST_DISPLAY_MODE = "ZK_DASHBOARD_CALENDAR_REQUEST_DISPLAY_MODE";
|
||||
public static final String ZK_DASHBOARD_PERFORMANCE_TIMEOUT = "ZK_DASHBOARD_PERFORMANCE_TIMEOUT";
|
||||
public static final String ZK_DASHBOARD_PERFORMANCE_REFRESH_INTERVAL = "ZK_DASHBOARD_PERFORMANCE_REFRESH_INTERVAL";
|
||||
public static final String ZK_DASHBOARD_PERFORMANCE_TIMEOUT = "ZK_DASHBOARD_PERFORMANCE_TIMEOUT";
|
||||
public static final String ZK_DASHBOARD_REFRESH_INTERVAL = "ZK_DASHBOARD_REFRESH_INTERVAL";
|
||||
public static final String ZK_DECIMALBOX_PROCESS_DOTKEYPAD = "ZK_DECIMALBOX_PROCESS_DOTKEYPAD";
|
||||
public static final String ZK_DESKTOP_CLASS = "ZK_DESKTOP_CLASS";
|
||||
|
|
|
@ -29,7 +29,7 @@ public class X_AD_PostIt extends PO implements I_AD_PostIt, I_Persistent
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20171031L;
|
||||
private static final long serialVersionUID = 20171107L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_PostIt (Properties ctx, int AD_PostIt_ID, String trxName)
|
||||
|
@ -37,7 +37,7 @@ public class X_AD_PostIt extends PO implements I_AD_PostIt, I_Persistent
|
|||
super (ctx, AD_PostIt_ID, trxName);
|
||||
/** if (AD_PostIt_ID == 0)
|
||||
{
|
||||
setAD_Postit_ID (0);
|
||||
setAD_PostIt_ID (0);
|
||||
} */
|
||||
}
|
||||
|
||||
|
@ -70,20 +70,20 @@ public class X_AD_PostIt extends PO implements I_AD_PostIt, I_Persistent
|
|||
}
|
||||
|
||||
/** Set Post-it.
|
||||
@param AD_Postit_ID Post-it */
|
||||
public void setAD_Postit_ID (int AD_Postit_ID)
|
||||
@param AD_PostIt_ID Post-it */
|
||||
public void setAD_PostIt_ID (int AD_PostIt_ID)
|
||||
{
|
||||
if (AD_Postit_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_Postit_ID, null);
|
||||
if (AD_PostIt_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_AD_PostIt_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_AD_Postit_ID, Integer.valueOf(AD_Postit_ID));
|
||||
set_ValueNoCheck (COLUMNNAME_AD_PostIt_ID, Integer.valueOf(AD_PostIt_ID));
|
||||
}
|
||||
|
||||
/** Get Post-it.
|
||||
@return Post-it */
|
||||
public int getAD_Postit_ID ()
|
||||
public int getAD_PostIt_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Postit_ID);
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_PostIt_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
|
|
|
@ -13,6 +13,7 @@ Import-Package: org.apache.commons.codec,
|
|||
Export-Package: org.adempiere.pipo.srv,
|
||||
org.adempiere.pipo2,
|
||||
org.adempiere.pipo2.exception
|
||||
Require-Bundle: org.adempiere.base;bundle-version="0.0.0"
|
||||
Require-Bundle: org.adempiere.base;bundle-version="0.0.0",
|
||||
org.adempiere.plugin.utils;bundle-version="0.0.0"
|
||||
Service-Component: OSGI-INF/dictionaryservice.xml
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Activator: org.adempiere.plugin.utils.PackInApplicationActivator
|
||||
|
|
|
@ -47,6 +47,10 @@ public class PipoDictionaryService implements IDictionaryService {
|
|||
trxName = Trx.createTrxName("PipoDS");
|
||||
Trx.get(trxName, true).setDisplayName(getClass().getName()+"_merge");
|
||||
packIn = new PackIn();
|
||||
//external files must not start with "2Pack" prefix in order to work correctly
|
||||
if ("org.adempiere.pipo".equals(context.getBundle().getSymbolicName()) && !packageFile.getName().startsWith("2Pack"))
|
||||
packIn.setPackageName(packageFile.getName());
|
||||
else
|
||||
packIn.setPackageName(context.getBundle().getSymbolicName());
|
||||
|
||||
if (Env.getCtx().getProperty("#AD_Client_ID") == null) {
|
||||
|
|
|
@ -64,7 +64,7 @@ public abstract class AbstractActivator implements BundleActivator, ServiceTrack
|
|||
Query q = new Query(Env.getCtx(), X_AD_Package_Imp.Table_Name,
|
||||
where.toString(), null);
|
||||
q.setParameters(params);
|
||||
return q.first() != null;
|
||||
return q.match();
|
||||
}
|
||||
|
||||
public abstract String getName();
|
||||
|
|
|
@ -10,6 +10,7 @@ import java.util.logging.Level;
|
|||
import org.adempiere.base.IDictionaryService;
|
||||
import org.adempiere.util.ServerContext;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.model.MSession;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.model.ServerStateChangeEvent;
|
||||
import org.compiere.model.ServerStateChangeListener;
|
||||
|
@ -104,6 +105,8 @@ public class AdempiereActivator extends AbstractActivator {
|
|||
protected void packIn() {
|
||||
URL packout = context.getBundle().getEntry("/META-INF/2Pack.zip");
|
||||
if (packout != null && service != null) {
|
||||
//Create Session to be able to create records in AD_ChangeLog
|
||||
MSession.get(Env.getCtx(), true);
|
||||
FileOutputStream zipstream = null;
|
||||
try {
|
||||
// copy the resource to a temporary file to process it with 2pack
|
||||
|
@ -211,6 +214,7 @@ public class AdempiereActivator extends AbstractActivator {
|
|||
|
||||
protected void setupPackInContext() {
|
||||
Properties serverContext = new Properties();
|
||||
serverContext.setProperty("#AD_Client_ID", "0");
|
||||
ServerContext.setCurrentInstance(serverContext);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import java.util.logging.Level;
|
|||
import org.adempiere.base.IDictionaryService;
|
||||
import org.adempiere.util.ServerContext;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.model.MSession;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.model.ServerStateChangeEvent;
|
||||
import org.compiere.model.ServerStateChangeListener;
|
||||
|
@ -215,6 +216,8 @@ public class Incremental2PackActivator extends AbstractActivator {
|
|||
|
||||
protected boolean packIn(URL packout) {
|
||||
if (packout != null && service != null) {
|
||||
//Create Session to be able to create records in AD_ChangeLog
|
||||
MSession.get(Env.getCtx(), true);
|
||||
String path = packout.getPath();
|
||||
String suffix = "_"+path.substring(path.lastIndexOf("2Pack_"));
|
||||
System.out.println("Installing " + getName() + " " + path + " ...");
|
||||
|
@ -334,6 +337,7 @@ public class Incremental2PackActivator extends AbstractActivator {
|
|||
|
||||
protected void setupPackInContext() {
|
||||
Properties serverContext = new Properties();
|
||||
serverContext.setProperty("#AD_Client_ID", "0");
|
||||
ServerContext.setCurrentInstance(serverContext);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,317 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2017 Diego Ruiz *
|
||||
* Copyright (C) 2017 Trek Global *
|
||||
* 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.plugin.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.base.IDictionaryService;
|
||||
import org.adempiere.util.ServerContext;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.model.MClient;
|
||||
import org.compiere.model.MSession;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.model.ServerStateChangeEvent;
|
||||
import org.compiere.model.ServerStateChangeListener;
|
||||
import org.compiere.util.AdempiereSystemError;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.ServiceReference;
|
||||
import org.osgi.util.tracker.ServiceTracker;
|
||||
|
||||
public class PackInApplicationActivator extends AbstractActivator {
|
||||
|
||||
protected final static CLogger logger = CLogger.getCLogger(PackInApplicationActivator.class.getName());
|
||||
private List<File> filesToProcess = new ArrayList<>();
|
||||
private File currentFile;
|
||||
|
||||
@Override
|
||||
public void start(BundleContext context) throws Exception {
|
||||
this.context = context;
|
||||
if (logger.isLoggable(Level.INFO)) logger.info(getName() + " starting...");
|
||||
serviceTracker = new ServiceTracker<IDictionaryService, IDictionaryService>(context, IDictionaryService.class.getName(), this);
|
||||
serviceTracker.open();
|
||||
start();
|
||||
if (logger.isLoggable(Level.INFO))
|
||||
logger.info(getName() + " ready.");
|
||||
}
|
||||
|
||||
/**
|
||||
* call when bundle have been started ( after this.context have been set )
|
||||
*/
|
||||
protected void start() {
|
||||
};
|
||||
|
||||
/**
|
||||
* call when bundle is stop ( before this.context is set to null )
|
||||
*/
|
||||
protected void stop() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
stop();
|
||||
serviceTracker.close();
|
||||
this.context = null;
|
||||
if (logger.isLoggable(Level.INFO)) logger.info(context.getBundle().getSymbolicName() + " "
|
||||
+ context.getBundle().getHeaders().get("Bundle-Version")
|
||||
+ " stopped.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IDictionaryService addingService(ServiceReference<IDictionaryService> reference) {
|
||||
service = context.getService(reference);
|
||||
if (Adempiere.getThreadPoolExecutor() != null) {
|
||||
Adempiere.getThreadPoolExecutor().execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
automaticPackin();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Adempiere.addServerStateChangeListener(new ServerStateChangeListener() {
|
||||
@Override
|
||||
public void stateChange(ServerStateChangeEvent event) {
|
||||
if (event.getEventType() == ServerStateChangeEvent.SERVER_START && service != null) {
|
||||
automaticPackin();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void automaticPackin() {
|
||||
//Initial delay
|
||||
Timer t = new Timer();
|
||||
t.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
ClassLoader cl = Thread.currentThread().getContextClassLoader();
|
||||
try {
|
||||
Thread.currentThread().setContextClassLoader(PackInApplicationActivator.class.getClassLoader());
|
||||
setupPackInContext();
|
||||
installPackages();
|
||||
} finally {
|
||||
ServerContext.dispose();
|
||||
service = null;
|
||||
Thread.currentThread().setContextClassLoader(cl);
|
||||
}
|
||||
t.cancel();
|
||||
}
|
||||
}, MSysConfig.getIntValue(MSysConfig.AUTOMATIC_PACKIN_INITIAL_DELAY, 120) * 1000);
|
||||
}
|
||||
|
||||
private void installPackages() {
|
||||
|
||||
String folders = MSysConfig.getValue(MSysConfig.AUTOMATIC_PACKIN_FOLDERS);
|
||||
|
||||
if (Util.isEmpty(folders, true)) {
|
||||
logger.log(Level.INFO, "Not specified folders for automatic packin");
|
||||
return;
|
||||
}
|
||||
|
||||
File[] fileArray = getFilesToProcess(folders);
|
||||
|
||||
if (fileArray.length <= 0) {
|
||||
System.out.println("No zip files to process");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (getDBLock()) {
|
||||
//Create Session to be able to create records in AD_ChangeLog
|
||||
MSession.get(Env.getCtx(), true);
|
||||
for(File zipFile : fileArray) {
|
||||
currentFile = zipFile;
|
||||
if (!packIn(zipFile)) {
|
||||
// stop processing further packages if one fail
|
||||
break;
|
||||
}
|
||||
filesToProcess.remove(zipFile);
|
||||
}
|
||||
releaseLock();
|
||||
} else {
|
||||
logger.log(Level.SEVERE, "Could not acquire the DB lock to automatically install the packins");
|
||||
}
|
||||
} catch (AdempiereSystemError e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if (filesToProcess.size() > 0) {
|
||||
System.out.println("The following packages were not applied: ");
|
||||
for (File file : filesToProcess) {
|
||||
System.out.println(file.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean packIn(File packinFile) {
|
||||
if (packinFile != null && service != null) {
|
||||
String fileName = packinFile.getName();
|
||||
System.out.println("Installing " + fileName + " ...");
|
||||
|
||||
// The convention for package names is: yyyymmddHHMM_ClientValue_InformationalDescription.zip
|
||||
String [] parts = fileName.split("_");
|
||||
String clientValue = parts[1];
|
||||
|
||||
MClient client = getClient(clientValue);
|
||||
if (client == null) {
|
||||
logger.log(Level.SEVERE, "Client does not exist: " + clientValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
Env.setContext(Env.getCtx(), "#AD_Client_ID", client.getAD_Client_ID());
|
||||
|
||||
try {
|
||||
// call 2pack
|
||||
if (!merge(packinFile, null))
|
||||
return false;
|
||||
} catch (Throwable e) {
|
||||
logger.log(Level.SEVERE, "Pack in failed.", e);
|
||||
return false;
|
||||
}
|
||||
System.out.println(packinFile.getPath() + " installed");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private File[] getFilesToProcess(String folders) {
|
||||
String filePaths[] = null;
|
||||
if (folders.indexOf(";") > 0) {
|
||||
filePaths = folders.split("[;]");
|
||||
} else {
|
||||
filePaths = new String[]{folders};
|
||||
}
|
||||
|
||||
//Add files to the array
|
||||
for (String filePath : filePaths) {
|
||||
File toProcess = new File(filePath.trim());
|
||||
if (!toProcess.exists()) {
|
||||
logger.log(Level.SEVERE, filePath + " does not exist");
|
||||
continue;
|
||||
}
|
||||
|
||||
processFilePath(toProcess);
|
||||
}
|
||||
|
||||
//Verify installed packages and remove those that were installed previously
|
||||
verifyInstalledPackages();
|
||||
|
||||
File[] fileArray = filesToProcess.toArray(new File[filesToProcess.size()]);
|
||||
// Sort files by name
|
||||
Arrays.sort(fileArray, new Comparator<File>() {
|
||||
@Override
|
||||
public int compare(File f1, File f2) {
|
||||
return f1.getName().compareTo(f2.getName());
|
||||
}
|
||||
});
|
||||
|
||||
return fileArray;
|
||||
}
|
||||
|
||||
private void processFilePath(File toProcess) {
|
||||
if (toProcess.isFile()) {
|
||||
if (toProcess.getName().toLowerCase().endsWith(".zip"))
|
||||
filesToProcess.add(toProcess);
|
||||
else {
|
||||
logger.log(Level.SEVERE, toProcess.getName() + " is not a valid .zip file");
|
||||
return;
|
||||
}
|
||||
} else if (toProcess.isDirectory()) {
|
||||
FileFilter filter = new FileFilter() {
|
||||
public boolean accept(File file) {
|
||||
if (file.getName().toUpperCase().endsWith(".ZIP") || file.isDirectory())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
};
|
||||
boolean found = false;
|
||||
for (File fileToProcess : toProcess.listFiles(filter)) {
|
||||
if (!found) {
|
||||
System.out.println("*** Creating list from folder " + toProcess.toString());
|
||||
found = true;
|
||||
}
|
||||
if (fileToProcess.isDirectory())
|
||||
processFilePath(fileToProcess);
|
||||
else
|
||||
filesToProcess.add(fileToProcess);
|
||||
}
|
||||
if (!found) {
|
||||
logger.log(Level.SEVERE, toProcess.getName() + " does not have .zip files or subfolders");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
logger.log(Level.SEVERE, toProcess.getName() + " not a file or folder");
|
||||
}
|
||||
}
|
||||
|
||||
private void verifyInstalledPackages() {
|
||||
Iterator<File> iterator = filesToProcess.iterator();
|
||||
while(iterator.hasNext()){
|
||||
currentFile = iterator.next();
|
||||
if (installedPackage(null)) {
|
||||
logger.log(Level.INFO, currentFile.getName() + " already installed. Removing it from the list...");
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private MClient getClient(String clientValue) {
|
||||
String where = "upper(Value) = upper(?)";
|
||||
Query q = new Query(Env.getCtx(), MClient.Table_Name,
|
||||
where, null)
|
||||
.setParameters(new Object[] {clientValue})
|
||||
.setOnlyActiveRecords(true);
|
||||
|
||||
return q.first();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifiedService(ServiceReference<IDictionaryService> reference, IDictionaryService service) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removedService(ServiceReference<IDictionaryService> reference, IDictionaryService service) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
if (currentFile != null)
|
||||
return currentFile.getName();
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
protected void setupPackInContext() {
|
||||
Properties serverContext = new Properties();
|
||||
serverContext.setProperty("#AD_Client_ID", "0");
|
||||
ServerContext.setCurrentInstance(serverContext);
|
||||
};
|
||||
|
||||
}
|
|
@ -28,6 +28,7 @@ import java.util.logging.Level;
|
|||
import org.adempiere.base.IDictionaryService;
|
||||
import org.adempiere.util.ServerContext;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.model.MSession;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.model.ServerStateChangeEvent;
|
||||
import org.compiere.model.ServerStateChangeListener;
|
||||
|
@ -160,6 +161,8 @@ public class Version2PackActivator extends AbstractActivator {
|
|||
|
||||
try {
|
||||
if (getDBLock()) {
|
||||
//Create Session to be able to create records in AD_ChangeLog
|
||||
MSession.get(Env.getCtx(), true);
|
||||
for(TwoPackEntry entry : list) {
|
||||
if (!packIn(entry.url)) {
|
||||
// stop processing further packages if one fail
|
||||
|
@ -304,6 +307,7 @@ public class Version2PackActivator extends AbstractActivator {
|
|||
|
||||
protected void setupPackInContext() {
|
||||
Properties serverContext = new Properties();
|
||||
serverContext.setProperty("#AD_Client_ID", "0");
|
||||
ServerContext.setCurrentInstance(serverContext);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
|
@ -3,7 +3,8 @@ Bundle-ManifestVersion: 2
|
|||
Bundle-Name: JasperReport Font Demo
|
||||
Bundle-SymbolicName: org.adempiere.report.jasper.fonts
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8,
|
||||
JavaSE-1.7
|
||||
Export-Package: org.adempiere.report.jasper.fonts
|
||||
Fragment-Host: org.adempiere.report.jasper.library
|
||||
Fragment-Host: net.sf.jasperreports.engine;bundle-version="6.3.1"
|
||||
|
||||
|
|
|
@ -744,7 +744,7 @@ public class VPAttributeDialog extends CDialog
|
|||
|
||||
// *** Save Attributes ***
|
||||
// New Instance
|
||||
if (m_changed || m_masi.getM_AttributeSetInstance_ID() == 0)
|
||||
if (mandatory.isEmpty() && (m_changed || m_masi.getM_AttributeSetInstance_ID() == 0))
|
||||
{
|
||||
m_masi.saveEx();
|
||||
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
||||
|
@ -785,8 +785,13 @@ public class VPAttributeDialog extends CDialog
|
|||
m_changed = true;
|
||||
} // for all attributes
|
||||
|
||||
if (mandatory.length() > 0)
|
||||
{
|
||||
ADialog.error(m_WindowNo, this, "FillMandatory", mandatory);
|
||||
return false;
|
||||
}
|
||||
// Save Model
|
||||
if (m_changed)
|
||||
else if (m_changed)
|
||||
{
|
||||
m_masi.setDescription ();
|
||||
m_masi.saveEx();
|
||||
|
@ -794,11 +799,6 @@ public class VPAttributeDialog extends CDialog
|
|||
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
||||
m_M_AttributeSetInstanceName = m_masi.getDescription();
|
||||
//
|
||||
if (mandatory.length() > 0)
|
||||
{
|
||||
ADialog.error(m_WindowNo, this, "FillMandatory", mandatory);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} // saveSelection
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ public class VPostIt extends CDialog implements ChangeListener, ActionListener,
|
|||
textPane.setBackground(AdempierePLAF.getFieldBackground_Inactive());
|
||||
|
||||
String createdupdated = null;
|
||||
if (m_postIt.getAD_Postit_ID() > 0)
|
||||
if (m_postIt.getAD_PostIt_ID() > 0)
|
||||
createdupdated = m_postIt.getCreatedString();
|
||||
String updated = m_postIt.getUpdatedString();
|
||||
|
||||
|
|
|
@ -692,9 +692,15 @@ public final class AEnv
|
|||
sb.append(prefix);
|
||||
if (windowNo > 0){
|
||||
sb.append(Env.getContext(ctx, windowNo, "_WinInfo_WindowName", false)).append(": ");
|
||||
final String documentNo = Env.getContext(ctx, windowNo, "DocumentNo", false);
|
||||
final String value = Env.getContext(ctx, windowNo, "Value", false);
|
||||
final String name = Env.getContext(ctx, windowNo, "Name", false);
|
||||
String documentNo = Env.getContext(ctx, windowNo, "DocumentNo", false);
|
||||
if (Util.isEmpty(documentNo)) // try first tab
|
||||
documentNo = Env.getContext(ctx, windowNo, 0, "DocumentNo", false);
|
||||
String value = Env.getContext(ctx, windowNo, "Value", false);
|
||||
if (Util.isEmpty(value)) // try first tab
|
||||
value = Env.getContext(ctx, windowNo, 0, "Value", false);
|
||||
String name = Env.getContext(ctx, windowNo, "Name", false);
|
||||
if (Util.isEmpty(name)) // try first tab
|
||||
name = Env.getContext(ctx, windowNo, 0, "Name", false);
|
||||
if(!"".equals(documentNo)) {
|
||||
sb.append(documentNo).append(" ");
|
||||
}
|
||||
|
|
|
@ -333,7 +333,7 @@ public class ProcessParameterPanel extends Panel implements
|
|||
ZKUpdateUtil.setWidth(box, "100%");
|
||||
box.appendChild(editor.getComponent());
|
||||
ZKUpdateUtil.setWidth((HtmlBasedComponent) editor.getComponent(), "49%");
|
||||
setEditorPlaceHolder(editor, Msg.getMsg(Env.getCtx(), "From"));
|
||||
setEditorPlaceHolder(editor, Msg.getMsg(Env.getCtx(), "ProcessParameterRangeFrom"));
|
||||
//
|
||||
GridFieldVO voF2 = GridFieldVO.createParameter(voF);
|
||||
GridField mField2 = new GridField(voF2);
|
||||
|
@ -348,7 +348,7 @@ public class ProcessParameterPanel extends Panel implements
|
|||
mField2.addPropertyChangeListener(editor2);
|
||||
editor2.dynamicDisplay();
|
||||
ZKUpdateUtil.setWidth((HtmlBasedComponent) editor2.getComponent(), "49%");
|
||||
setEditorPlaceHolder(editor2, Msg.getMsg(Env.getCtx(), "To"));
|
||||
setEditorPlaceHolder(editor2, Msg.getMsg(Env.getCtx(), "ProcessParameterRangeTo"));
|
||||
// setup editor context menu
|
||||
popupMenu = editor2.getPopupMenu();
|
||||
if (popupMenu != null) {
|
||||
|
@ -417,7 +417,7 @@ public class ProcessParameterPanel extends Panel implements
|
|||
sb.append(", ");
|
||||
sb.append(field.getHeader());
|
||||
if (m_wEditors2.get(i) != null) // is a range
|
||||
sb.append(" (").append(Msg.getMsg(Env.getCtx(), "From")).append(")");
|
||||
sb.append(" (").append(Msg.getMsg(Env.getCtx(), "ProcessParameterRangeFrom")).append(")");
|
||||
} else
|
||||
field.setError(false);
|
||||
// Check for Range
|
||||
|
@ -433,7 +433,7 @@ public class ProcessParameterPanel extends Panel implements
|
|||
if (sb.length() > 0)
|
||||
sb.append(", ");
|
||||
sb.append(field2.getHeader());
|
||||
sb.append(" (").append(Msg.getMsg(Env.getCtx(), "To")).append(")");
|
||||
sb.append(" (").append(Msg.getMsg(Env.getCtx(), "ProcessParameterRangeTo")).append(")");
|
||||
} else
|
||||
field2.setError(false);
|
||||
} // range field
|
||||
|
|
|
@ -3,10 +3,8 @@
|
|||
*/
|
||||
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.Util;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
|
@ -16,7 +14,7 @@ public class InfoBPartnerWindow extends InfoWindow {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5291476382115985651L;
|
||||
private static final long serialVersionUID = 240758053410996182L;
|
||||
|
||||
/**
|
||||
* @param WindowNo
|
||||
|
@ -78,37 +76,6 @@ public class InfoBPartnerWindow extends InfoWindow {
|
|||
ih = null;
|
||||
} // showHistory
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* set value of checkbox IsVendor and IsCustomer by IsSOTrx flag
|
||||
*/
|
||||
@Override
|
||||
protected void initParameters() {
|
||||
String isSOTrx = Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx");
|
||||
if (!isLookup() && Util.isEmpty(isSOTrx)) {
|
||||
isSOTrx = "Y";
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(isSOTrx)) {
|
||||
if ("Y".equals(isSOTrx)) {
|
||||
// set value of IsCustomer checkbox
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsCustomer")) {
|
||||
editor.setValue("Y");
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if ("N".equals(isSOTrx)) {
|
||||
// set value of IsVendor checkbox
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsVendor")) {
|
||||
editor.setValue("Y");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveSelectionDetail() {
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
*/
|
||||
package org.adempiere.webui.info;
|
||||
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
*
|
||||
|
@ -15,7 +11,7 @@ public class InfoInOutWindow extends InfoWindow {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1687215125029008351L;
|
||||
private static final long serialVersionUID = 3027121642718090785L;
|
||||
|
||||
/**
|
||||
* @param WindowNo
|
||||
|
@ -50,26 +46,4 @@ public class InfoInOutWindow extends InfoWindow {
|
|||
whereClause, AD_InfoWindow_ID, lookup);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* set value of checkbox isSoTrx
|
||||
*/
|
||||
@Override
|
||||
protected void initParameters() {
|
||||
String isSOTrx = Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx");
|
||||
if (!isLookup() && Util.isEmpty(isSOTrx)) {
|
||||
isSOTrx = "Y";
|
||||
}
|
||||
|
||||
// set value of isSoTrx checkbox by env
|
||||
if (!Util.isEmpty(isSOTrx)) {
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsSOTrx")) {
|
||||
editor.setValue(isSOTrx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
*/
|
||||
package org.adempiere.webui.info;
|
||||
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
|
@ -15,7 +13,7 @@ public class InfoInvoiceWindow extends InfoWindow {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3169476148884310274L;
|
||||
private static final long serialVersionUID = -5175983673145977830L;
|
||||
|
||||
/**
|
||||
* @param WindowNo
|
||||
|
@ -50,37 +48,6 @@ public class InfoInvoiceWindow extends InfoWindow {
|
|||
whereClause, AD_InfoWindow_ID, lookup);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initParameters() {
|
||||
String isSOTrx = Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx");
|
||||
if (!isLookup() && Util.isEmpty(isSOTrx)) {
|
||||
isSOTrx = "Y";
|
||||
}
|
||||
|
||||
//Set Defaults
|
||||
String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID");
|
||||
if (!Util.isEmpty(bp)) {
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("C_BPartner_ID")) {
|
||||
editor.setValue(new Integer(bp));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(isSOTrx)) {
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsSOTrx")) {
|
||||
editor.setValue(isSOTrx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void saveSelectionDetail() {
|
||||
int row = contentPanel.getSelectedRow();
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
*/
|
||||
package org.adempiere.webui.info;
|
||||
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
*
|
||||
|
@ -15,7 +11,7 @@ public class InfoOrderWindow extends InfoWindow {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -558954356627208290L;
|
||||
private static final long serialVersionUID = 1241927188305227636L;
|
||||
|
||||
/**
|
||||
* @param WindowNo
|
||||
|
@ -50,34 +46,4 @@ public class InfoOrderWindow extends InfoWindow {
|
|||
whereClause, AD_InfoWindow_ID, lookup);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initParameters() {
|
||||
String isSOTrx = Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx");
|
||||
if (!isLookup() && Util.isEmpty(isSOTrx)) {
|
||||
isSOTrx = "Y";
|
||||
}
|
||||
|
||||
//Set Defaults
|
||||
String bp = Env.getContext(Env.getCtx(), p_WindowNo, "C_BPartner_ID");
|
||||
if (!Util.isEmpty(bp)) {
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("C_BPartner_ID")) {
|
||||
editor.setValue(new Integer(bp));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(isSOTrx)) {
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsSOTrx")) {
|
||||
editor.setValue(isSOTrx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
*/
|
||||
package org.adempiere.webui.info;
|
||||
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
/**
|
||||
* @author hengsin
|
||||
*
|
||||
|
@ -15,7 +11,7 @@ public class InfoPaymentWindow extends InfoWindow {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3556977962189259779L;
|
||||
private static final long serialVersionUID = 1322780214387328688L;
|
||||
|
||||
/**
|
||||
* @param WindowNo
|
||||
|
@ -50,23 +46,4 @@ public class InfoPaymentWindow extends InfoWindow {
|
|||
whereClause, AD_InfoWindow_ID, lookup);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
protected void initParameters() {
|
||||
String isSOTrx = Env.getContext(Env.getCtx(), p_WindowNo, "IsSOTrx");
|
||||
if (!isLookup() && Util.isEmpty(isSOTrx)) {
|
||||
isSOTrx = "Y";
|
||||
}
|
||||
|
||||
if (!Util.isEmpty(isSOTrx)) {
|
||||
for (WEditor editor : editors) {
|
||||
if (editor.getGridField() != null && editor.getGridField().getColumnName().equals("IsReceipt")) {
|
||||
editor.setValue(isSOTrx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -346,7 +346,7 @@ public class WImageDialog extends Window implements EventListener<Event>
|
|||
|
||||
// OK
|
||||
fileNameTextbox.setValue(imageFile.getName());
|
||||
invalidate();
|
||||
mainLayout.invalidate();
|
||||
|
||||
// Save info
|
||||
if (m_mImage == null)
|
||||
|
|
|
@ -977,7 +977,7 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
|
|||
|
||||
// *** Save Attributes ***
|
||||
// New Instance
|
||||
if (m_changed || m_masi.getM_AttributeSetInstance_ID() == 0)
|
||||
if (mandatory.isEmpty() && (m_changed || m_masi.getM_AttributeSetInstance_ID() == 0))
|
||||
{
|
||||
m_masi.saveEx();
|
||||
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
||||
|
@ -1021,13 +1021,6 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
|
|||
}
|
||||
m_changed = true;
|
||||
} // for all attributes
|
||||
|
||||
// Save Model
|
||||
if (m_changed)
|
||||
{
|
||||
m_masi.setDescription ();
|
||||
m_masi.saveEx();
|
||||
}
|
||||
m_M_AttributeSetInstance_ID = m_masi.getM_AttributeSetInstance_ID ();
|
||||
m_M_AttributeSetInstanceName = m_masi.getDescription();
|
||||
//
|
||||
|
@ -1036,6 +1029,12 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
|
|||
FDialog.error(m_WindowNo, this, "FillMandatory", mandatory);
|
||||
return false;
|
||||
}
|
||||
// Save Model
|
||||
else if (m_changed)
|
||||
{
|
||||
m_masi.setDescription ();
|
||||
m_masi.saveEx();
|
||||
}
|
||||
return true;
|
||||
} // saveSelection
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public class WPostIt extends Window implements EventListener<Event>{
|
|||
m_postIt = new MPostIt (Env.getCtx(), tableID, recordID, trxName);
|
||||
|
||||
String created = null;
|
||||
if (m_postIt.getAD_Postit_ID() > 0)
|
||||
if (m_postIt.getAD_PostIt_ID() > 0)
|
||||
created = m_postIt.getCreatedString();
|
||||
String updated = m_postIt.getUpdatedString();
|
||||
|
||||
|
|
|
@ -57,9 +57,11 @@ import org.zkoss.zhtml.Text;
|
|||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.A;
|
||||
import org.zkoss.zul.Borderlayout;
|
||||
import org.zkoss.zul.Center;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Hbox;
|
||||
import org.zkoss.zul.Listhead;
|
||||
import org.zkoss.zul.Listheader;
|
||||
import org.zkoss.zul.North;
|
||||
|
@ -83,7 +85,7 @@ public class WRecordInfo extends Window implements EventListener<Event>
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -8325604065202356483L;
|
||||
private static final long serialVersionUID = -7436682051825360216L;
|
||||
|
||||
/**
|
||||
* Record Info
|
||||
|
@ -135,6 +137,8 @@ public class WRecordInfo extends Window implements EventListener<Event>
|
|||
private Vector<Vector<String>> m_data = new Vector<Vector<String>>();
|
||||
/** Info */
|
||||
private StringBuffer m_info = new StringBuffer();
|
||||
/** Permalink */
|
||||
private A m_permalink = new A();
|
||||
|
||||
/** Date Time Format */
|
||||
private SimpleDateFormat m_dateTimeFormat = DisplayType.getDateFormat
|
||||
|
@ -196,7 +200,17 @@ public class WRecordInfo extends Window implements EventListener<Event>
|
|||
South south = new South();
|
||||
south.setSclass("dialog-footer");
|
||||
south.setParent(layout);
|
||||
south.appendChild(confirmPanel);
|
||||
//
|
||||
m_permalink.setTarget("_blank");
|
||||
m_permalink.setLabel(Msg.getMsg(Env.getCtx(), "Permalink"));
|
||||
m_permalink.setTooltiptext(Msg.getMsg(Env.getCtx(), "Permalink_tooltip"));
|
||||
Hbox hbox = new Hbox();
|
||||
hbox.setWidth("100%");
|
||||
south.appendChild(hbox);
|
||||
ZKUpdateUtil.setHflex(m_permalink, "true");
|
||||
hbox.appendChild(m_permalink);
|
||||
ZKUpdateUtil.setHflex(confirmPanel, "true");
|
||||
hbox.appendChild(confirmPanel);
|
||||
|
||||
confirmPanel.addActionListener(Events.ON_CLICK, this);
|
||||
} // jbInit
|
||||
|
@ -251,6 +265,8 @@ public class WRecordInfo extends Window implements EventListener<Event>
|
|||
String uuid = po.get_ValueAsString(uuidcol);
|
||||
if (!Util.isEmpty(uuid))
|
||||
m_info.append("\n ").append(uuidcol).append("=").append(uuid);
|
||||
m_permalink.setHref(AEnv.getZoomUrlTableID(po));
|
||||
m_permalink.setVisible(po.get_KeyColumns().length == 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
.desktop-header-popup .desktop-header {
|
||||
border: none;
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.desktop-header-username {
|
||||
|
|
Loading…
Reference in New Issue