From 0cf10556925cb72fb5ac1ff00458a3e21cae1e54 Mon Sep 17 00:00:00 2001 From: Tony Snook Date: Thu, 6 Jan 2022 12:57:41 +1100 Subject: [PATCH] IDEMPIERE-5063 Improve Unit Tests - fix ProductionTest RollUp test (#1115) - set mulch product category to Standard Costing category, so that the standard cost of the component is compared to the standard cost of the parent, mulchx. --- .../src/org/idempiere/test/model/ProductionTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.idempiere.test/src/org/idempiere/test/model/ProductionTest.java b/org.idempiere.test/src/org/idempiere/test/model/ProductionTest.java index 964e1e7b5c..a88e28151b 100644 --- a/org.idempiere.test/src/org/idempiere/test/model/ProductionTest.java +++ b/org.idempiere.test/src/org/idempiere/test/model/ProductionTest.java @@ -383,7 +383,10 @@ public class ProductionTest extends AbstractTestCase { try { int rollUpProcessId = 53230; int mulchId = 137; - MProduct mulch = MProduct.get(mulchId); + MProduct mulch = new MProduct(Env.getCtx(), mulchId, getTrxName()); + mulch.setM_Product_Category_ID(category.get_ID()); + mulch.saveEx(); + BigDecimal componentCost = MCost.getCurrentCost(mulch, 0, getTrxName()); MProduct mulchX = new MProduct(Env.getCtx(), 0, getTrxName());