Syvasoft - 2015-09-17

Hi Guys,

I am using ADempiere 380LTS.

When I use Average PO costing method for a specific Product Category, the following exception is thrown while posting Material Receipt document. But the same Material Receipt Document can be posted when I switch from Average PO to Standard Costing.

Could you guys shed light on this issue?

Thank you guys,
Kind regards,
Syed.

Here is the exception log:
===========> Query.first: SELECT M_Warehouse_ID,CostAdjustmentDateLL,M_CostElement_ID,DeltaAmt,AD_Client_ID,AD_Org_ID,C_ProjectIssue_ID,(CASE WHEN Qty=0 THEN 0 ELSE Amt/Qty END) AS Price,M_MovementLine_ID,CreatedBy,Updated,UpdatedBy,C_AcctSchema_ID,Amt,Qty,IsSOTrx,IsActive,DeltaQty,Created,M_InventoryLine_ID,M_ProductionLine_ID,M_AttributeSetInstance_ID,M_CostDetail_ID,CumulatedAmt,CurrentCostPrice,CurrentQty,CumulatedQty,SeqNo,C_LandedCostAllocation_ID,M_CostType_ID,M_Transaction_ID,DateAcct,CostingMethod,Processed,Description,CostAdjustment,CostAdjustmentDate,CurrentCostPriceLL,C_InvoiceLine_ID,C_OrderLine_ID,M_InOutLine_ID,M_Product_ID,PP_Cost_Collector_ID,CostAmt,IsReversal,Processing,CostAdjustmentLL,CostAmtLL,AmtLL,CumulatedAmtLL FROM M_CostDetail WHERE (AD_Client_ID=? AND AD_Org_ID=? AND M_Warehouse_ID=? AND C_AcctSchema_ID=? AND M_Product_ID=? AND M_AttributeSetInstance_ID=? AND M_CostElement_ID=? AND M_CostType_ID=? AND M_Transaction_ID=? AND M_MatchPO_ID=? AND Qty<>0 ) ORDER BY SeqNo DESC [58]
org.postgresql.util.PSQLException: ERROR: column "m_matchpo_id" does not exist
Position: 950; State=42703; ErrorCode=0
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:304)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.compiere.db.StatementProxy.invoke(StatementProxy.java:100)
at com.sun.proxy.$Proxy0.executeQuery(Unknown Source)
at org.compiere.model.Query.createResultSet(Query.java:758)
at org.compiere.model.Query.first(Query.java:304)
at org.compiere.model.MCostDetail.getByTransaction(MCostDetail.java:410)
at org.adempiere.engine.AveragePOCostingMethod.setCostingMethod(AveragePOCostingMethod.java:42)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:414)
at org.adempiere.engine.CostEngine.createCostDetail(CostEngine.java:256)
at org.compiere.model.MMatchPO.afterSave(MMatchPO.java:671)
at org.compiere.model.PO.saveFinish(PO.java:2239)
at org.compiere.model.PO.saveNew(PO.java:2812)
at org.compiere.model.PO.save(PO.java:2123)
at org.compiere.model.MInOut.completeIt(MInOut.java:1582)
at org.compiere.process.DocumentEngine.completeIt(DocumentEngine.java:475)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:292)
at org.compiere.process.DocumentEngine.processIt(DocumentEngine.java:256)
at org.compiere.model.MInOut.processIt(MInOut.java:1049)
at org.compiere.wf.MWFActivity.performWork(MWFActivity.java:897)
at org.compiere.wf.MWFActivity.run(MWFActivity.java:789)
at org.compiere.wf.MWFProcess.startNext(MWFProcess.java:370)
at org.compiere.wf.MWFProcess.checkActivities(MWFProcess.java:280)
at org.compiere.wf.MWFActivity.setWFState(MWFActivity.java:278)
at org.compiere.wf.MWFActivity.run(MWFActivity.java:806)
at org.compiere.wf.MWFProcess.startNext(MWFProcess.java:370)
at org.compiere.wf.MWFProcess.checkActivities(MWFProcess.java:280)
at org.compiere.wf.MWFActivity.setWFState(MWFActivity.java:278)
at org.compiere.wf.MWFActivity.run(MWFActivity.java:806)
at org.compiere.wf.MWFProcess.startWork(MWFProcess.java:502)
at org.compiere.wf.MWorkflow.start(MWorkflow.java:696)
at org.compiere.wf.MWorkflow.startWait(MWorkflow.java:726)