IDEMPIERE-2398 Renamed FA_ProjectCreateAsset to "Create Asset from Project" and added/fixed broken parameters (#1556)
* IDEMPIERE-2398 Renamed FA_ProjectCreateAsset to "Create Asset from Project" and added/fixed broken parameters * IDEMPIERE-2398 - improve error message of process * - set asset value from project committed amount * - set asset value back from project balance amount - make the project balance amount editable - add link to the asset addition at the end of the process Co-authored-by: Chuck Boecking <chuck@chuboe.com>
This commit is contained in:
parent
da587235c7
commit
f84ca70440
|
@ -0,0 +1,34 @@
|
|||
-- IDEMPIERE-2398
|
||||
SELECT register_migration_script('202211112054_IDEMPIERE-2398.sql') FROM dual;
|
||||
|
||||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Nov 11, 2022, 8:54:32 PM CET
|
||||
UPDATE AD_Menu SET Name='Create Asset from Project', AD_Window_ID=NULL, AD_Workflow_ID=NULL, AD_Task_ID=NULL, AD_Form_ID=NULL, AD_InfoWindow_ID=NULL,Updated=TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=200006
|
||||
;
|
||||
|
||||
-- Nov 11, 2022, 8:54:32 PM CET
|
||||
UPDATE AD_Process SET Name='Create Asset from Project', AD_ReportView_ID=NULL, Statistic_Count=9, Statistic_Seconds=461, AD_PrintFormat_ID=NULL, AD_Workflow_ID=NULL, AD_Form_ID=NULL, AD_CtxHelp_ID=NULL,Updated=TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200000
|
||||
;
|
||||
|
||||
-- Nov 11, 2022, 8:54:32 PM CET
|
||||
UPDATE AD_Process_Para SET AD_Reference_Value_ID=NULL, FieldLength=10, DefaultValue=NULL, IsCentrallyMaintained='N', AD_Element_ID=208, DisplayLogic=NULL,Updated=TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200000
|
||||
;
|
||||
|
||||
-- Nov 11, 2022, 8:54:33 PM CET
|
||||
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) VALUES (200413,0,0,'Y',TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),100,'Product','Product, Service, Item','Identifies an item which is either purchased or sold in this organization.',200000,20,30,'N',10,'N','M_Product_ID','Y','U',454,'269067ec-4d24-4b67-a918-cc62c016107e','N')
|
||||
;
|
||||
|
||||
-- Nov 14, 2022, 10:10:25 PM CET
|
||||
UPDATE AD_Field SET IsReadOnly='N',Updated=TO_TIMESTAMP('2022-11-14 22:10:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6549
|
||||
;
|
||||
|
||||
-- Nov 14, 2022, 10:11:05 PM CET
|
||||
UPDATE AD_Field SET IsReadOnly='N',Updated=TO_TIMESTAMP('2022-11-14 22:11:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7677
|
||||
;
|
||||
|
||||
-- Nov 14, 2022, 10:13:31 PM CET
|
||||
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2022-11-14 22:13:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8758
|
||||
;
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
-- IDEMPIERE-2398
|
||||
SELECT register_migration_script('202211112054_IDEMPIERE-2398.sql') FROM dual;
|
||||
|
||||
-- Nov 11, 2022, 8:54:32 PM CET
|
||||
UPDATE AD_Menu SET Name='Create Asset from Project', AD_Window_ID=NULL, AD_Workflow_ID=NULL, AD_Task_ID=NULL, AD_Form_ID=NULL, AD_InfoWindow_ID=NULL,Updated=TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=200006
|
||||
;
|
||||
|
||||
-- Nov 11, 2022, 8:54:32 PM CET
|
||||
UPDATE AD_Process SET Name='Create Asset from Project', AD_ReportView_ID=NULL, Statistic_Count=9, Statistic_Seconds=461, AD_PrintFormat_ID=NULL, AD_Workflow_ID=NULL, AD_Form_ID=NULL, AD_CtxHelp_ID=NULL,Updated=TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200000
|
||||
;
|
||||
|
||||
-- Nov 11, 2022, 8:54:32 PM CET
|
||||
UPDATE AD_Process_Para SET AD_Reference_Value_ID=NULL, FieldLength=10, DefaultValue=NULL, IsCentrallyMaintained='N', AD_Element_ID=208, DisplayLogic=NULL,Updated=TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=200000
|
||||
;
|
||||
|
||||
-- Nov 11, 2022, 8:54:33 PM CET
|
||||
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) VALUES (200413,0,0,'Y',TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-11-11 20:54:32','YYYY-MM-DD HH24:MI:SS'),100,'Product','Product, Service, Item','Identifies an item which is either purchased or sold in this organization.',200000,20,30,'N',10,'N','M_Product_ID','Y','U',454,'269067ec-4d24-4b67-a918-cc62c016107e','N')
|
||||
;
|
||||
|
||||
-- Nov 14, 2022, 10:10:25 PM CET
|
||||
UPDATE AD_Field SET IsReadOnly='N',Updated=TO_TIMESTAMP('2022-11-14 22:10:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6549
|
||||
;
|
||||
|
||||
-- Nov 14, 2022, 10:11:05 PM CET
|
||||
UPDATE AD_Field SET IsReadOnly='N',Updated=TO_TIMESTAMP('2022-11-14 22:11:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=7677
|
||||
;
|
||||
|
||||
-- Nov 14, 2022, 10:13:31 PM CET
|
||||
UPDATE AD_Column SET IsUpdateable='Y',Updated=TO_TIMESTAMP('2022-11-14 22:13:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8758
|
||||
;
|
||||
|
|
@ -27,6 +27,7 @@ import org.compiere.model.MProject;
|
|||
import org.compiere.process.DocAction;
|
||||
import org.compiere.process.ProcessInfoParameter;
|
||||
import org.compiere.process.SvrProcess;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -47,8 +48,6 @@ public class ProjectCreateAsset extends SvrProcess
|
|||
/** DateTrx for create asset */
|
||||
private Timestamp m_DateTrx = null;
|
||||
|
||||
private String message = "";
|
||||
|
||||
/**
|
||||
* Prepare - e.g., get Parameters.
|
||||
*/
|
||||
|
@ -106,13 +105,14 @@ public class ProjectCreateAsset extends SvrProcess
|
|||
|
||||
assetAdd.saveEx();
|
||||
if (!assetAdd.processIt(DocAction.ACTION_Complete)) {
|
||||
return "Error Process Asset Addition";
|
||||
return "Error Process Asset Addition: " + assetAdd.getProcessMsg();
|
||||
}
|
||||
assetAdd.saveEx();
|
||||
|
||||
message += ". @A_Asset_Addition_ID@ - " + assetAdd;
|
||||
|
||||
return "Asset Created " + message;
|
||||
String message = Msg.parseTranslation(getCtx(), "@A_Asset_Addition_ID@ - " + assetAdd);
|
||||
addBufferLog(0, null, null, message, MAssetAddition.Table_ID, assetAdd.getA_Asset_Addition_ID());
|
||||
|
||||
return "@Created@";
|
||||
} // doIt
|
||||
|
||||
} // ProjectClose
|
||||
|
|
Loading…
Reference in New Issue