IDEMPIERE-5526 - Translation Bom Verify Proces (#1623)

* IDEMPIERE-5526 - Translation Bom Verify Proces
This commit is contained in:
Jefferson Dalfre 2023-01-16 12:21:55 -03:00 committed by GitHub
parent 7ab1e8c3d5
commit c047592862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 65 additions and 8 deletions

View File

@ -0,0 +1,30 @@
-- IDEMPIERE-5526
SELECT register_migration_script('202212231904_IDEMPIERE-5526.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Dec 23, 2022, 7:04:21 PM BRT
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 ('E','{0} recursively contains {1}',0,0,'Y',TO_TIMESTAMP('2022-12-23 19:04:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-12-23 19:04:20','YYYY-MM-DD HH24:MI:SS'),100,200811,'BOMRecursivelyContains','D','90eea01f-b0fc-4d72-b40d-70ae6fe43ffd')
;
-- Dec 23, 2022, 7:06:54 PM BRT
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 ('E','No default BOM for product {0}',0,0,'Y',TO_TIMESTAMP('2022-12-23 19:06:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-12-23 19:06:53','YYYY-MM-DD HH24:MI:SS'),100,200812,'BOMNoDefaultBOMForProduct','D','12514fa3-0f5c-4af3-8b3a-0000e38fabca')
;
-- Dec 23, 2022, 7:07:27 PM BRT
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','BOM missing for product {0}',0,0,'Y',TO_TIMESTAMP('2022-12-23 19:07:26','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-12-23 19:07:26','YYYY-MM-DD HH24:MI:SS'),100,200813,'BOMMissingForProduct','D','caf952ea-a0f9-44da-be9e-5c79c3861649')
;
-- Dec 23, 2022, 7:07:33 PM BRT
UPDATE AD_Message SET MsgType='E',Updated=TO_TIMESTAMP('2022-12-23 19:07:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200813
;
-- Dec 23, 2022, 7:08:10 PM BRT
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 ('E','BOM {0} for product {1} does not have lines',0,0,'Y',TO_TIMESTAMP('2022-12-23 19:08:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-12-23 19:08:10','YYYY-MM-DD HH24:MI:SS'),100,200814,'BOMForProductDoesNotHaveLines','D','356544c0-e10f-4bb9-9215-a93b2f67243f')
;
-- Jan 14, 2023, 6:10:27 PM CET
UPDATE AD_Process_Para SET ReadOnlyLogic='@M_Product_ID@>0 & @_WinInfo_AD_Window_ID:0@>0',Updated=TO_TIMESTAMP('2023-01-14 18:10:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53461
;

View File

@ -0,0 +1,27 @@
-- IDEMPIERE-5526
SELECT register_migration_script('202212231904_IDEMPIERE-5526.sql') FROM dual;
-- Dec 23, 2022, 7:04:21 PM BRT
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 ('E','{0} recursively contains {1}',0,0,'Y',TO_TIMESTAMP('2022-12-23 19:04:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-12-23 19:04:20','YYYY-MM-DD HH24:MI:SS'),100,200811,'BOMRecursivelyContains','D','90eea01f-b0fc-4d72-b40d-70ae6fe43ffd')
;
-- Dec 23, 2022, 7:06:54 PM BRT
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 ('E','No default BOM for product {0}',0,0,'Y',TO_TIMESTAMP('2022-12-23 19:06:53','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-12-23 19:06:53','YYYY-MM-DD HH24:MI:SS'),100,200812,'BOMNoDefaultBOMForProduct','D','12514fa3-0f5c-4af3-8b3a-0000e38fabca')
;
-- Dec 23, 2022, 7:07:27 PM BRT
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','BOM missing for product {0}',0,0,'Y',TO_TIMESTAMP('2022-12-23 19:07:26','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-12-23 19:07:26','YYYY-MM-DD HH24:MI:SS'),100,200813,'BOMMissingForProduct','D','caf952ea-a0f9-44da-be9e-5c79c3861649')
;
-- Dec 23, 2022, 7:07:33 PM BRT
UPDATE AD_Message SET MsgType='E',Updated=TO_TIMESTAMP('2022-12-23 19:07:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Message_ID=200813
;
-- Dec 23, 2022, 7:08:10 PM BRT
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 ('E','BOM {0} for product {1} does not have lines',0,0,'Y',TO_TIMESTAMP('2022-12-23 19:08:10','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2022-12-23 19:08:10','YYYY-MM-DD HH24:MI:SS'),100,200814,'BOMForProductDoesNotHaveLines','D','356544c0-e10f-4bb9-9215-a93b2f67243f')
;
-- Jan 14, 2023, 6:10:27 PM CET
UPDATE AD_Process_Para SET ReadOnlyLogic='@M_Product_ID@>0 & @_WinInfo_AD_Window_ID:0@>0',Updated=TO_TIMESTAMP('2023-01-14 18:10:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53461
;

View File

@ -187,9 +187,9 @@ public class BOMVerify extends SvrProcess
{
invalid = true;
if (p_fromButton)
addLog(0, null, null, product.getValue() + " recursively contains " + pp.getValue());
addLog(0, null, null, Msg.getMsg(getCtx(), "BOMRecursivelyContains", new Object[] {product.getValue(), pp.getValue()}));
else
addBufferLog(0, null, null, product.getValue() + " recursively contains " + pp.getValue(), MProduct.Table_ID, product.getM_Product_ID());
addBufferLog(0, null, null, Msg.getMsg(getCtx(), "BOMRecursivelyContains", new Object[] {product.getValue(), pp.getValue()}), MProduct.Table_ID, product.getM_Product_ID());
}
else
{
@ -204,9 +204,9 @@ public class BOMVerify extends SvrProcess
if (lines == 0) {
invalid = true;
if (p_fromButton)
addLog(0, null, null, "BOM " + bom.getValue() + " for product " + product.getValue() + " does not have lines");
addLog(0, null, null, Msg.getMsg(getCtx(), "BOMForProductDoesNotHaveLines", new Object[] {bom.getValue(), product.getValue()}));
else
addBufferLog(0, null, null, "BOM " + bom.getValue() + " for product " + product.getValue() + " does not have lines", MProduct.Table_ID, product.getM_Product_ID());
addBufferLog(0, null, null, Msg.getMsg(getCtx(), "BOMForProductDoesNotHaveLines", new Object[] {bom.getValue(), product.getValue()}), MProduct.Table_ID, product.getM_Product_ID());
}
if (invalid || containsinvalid)
break;
@ -215,15 +215,15 @@ public class BOMVerify extends SvrProcess
if (boms.isEmpty()) {
invalid = true;
if (p_fromButton)
addLog(0, null, null, "BOM missing for product " + product.getValue());
addLog(0, null, null, Msg.getMsg(getCtx(), "BOMMissingForProduct", new Object[] {product.getValue()}));
else
addBufferLog(0, null, null, "BOM missing for product " + product.getValue(), MProduct.Table_ID, product.getM_Product_ID());
addBufferLog(0, null, null, Msg.getMsg(getCtx(), "BOMMissingForProduct", new Object[] {product.getValue()}), MProduct.Table_ID, product.getM_Product_ID());
} else if (MPPProductBOM.getDefault(product, get_TrxName()) == null) {
invalid = true;
if (p_fromButton)
addLog(0, null, null, "No default BOM for product " + product.getValue());
addLog(0, null, null, Msg.getMsg(getCtx(), "BOMNoDefaultBOMForProduct", new Object[] {product.getValue()}));
else
addBufferLog(0, null, null, "No default BOM for product " + product.getValue(), MProduct.Table_ID, product.getM_Product_ID());
addBufferLog(0, null, null, Msg.getMsg(getCtx(), "BOMNoDefaultBOMForProduct", new Object[] {product.getValue()}), MProduct.Table_ID, product.getM_Product_ID());
}
checkedproducts.add(product);