Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032036Openbravo ERP04. Warehouse managementpublic2016-01-28 10:382016-02-09 16:50
aferraz 
aferraz 
immediatemajoralways
closedfixed 
5
 
3.0PR16Q2 
dmiguelez
Core
No
0032036: API Change Request: Change m_transaction_trg to avoid execute m_update_inventory when costing related columns are updated
Related to issue 0031772: m_transaction_trg should be changed in order to execute m_update_inventory when we are updating a m_transaction record, only in case we are updating any column not related to costing.

This is necessary when validating a new costing rule and we have many old transactions with no cost calculated which need to be updated with zero cost.
In this case, we do not need to call m_update_inventory when m_transaction_trg is executed.

M_Transaction table has following columns:
-M_Transaction_ID
-AD_Client_ID
-AD_Org_ID
-IsActive
-Created
-CreatedBy
-Updated
-UpdatedBy
-MovementType
-M_Locator_ID
-M_Product_ID
-MovementDate
-MovementQty
-M_InventoryLine_ID
-M_MovementLine_ID
-M_InOutLine_ID
-M_ProductionLine_ID
-C_ProjectIssue_ID
-M_AttributeSetInstance_ID
-QuantityOrder
-M_Product_Uom_Id
-C_UOM_ID
-IsCostPermanent
-C_Currency_ID
-M_Internal_Consumptionline_ID
-Checkpricedifference
-Manualcostadjustment
-TransactionCost
-TrxProcessDate
-M_Costing_Algorithm_ID
-IsCostCalculated
-Isprocessed
-Checkreservedqty
-Costing_Status

M_Update_Inventory will only be executed in case we are updating any of following columns:
-M_Transaction_ID
-AD_Client_ID
-AD_Org_ID
-IsActive
-MovementType
-M_Locator_ID
-M_Product_ID
-MovementDate
-MovementQty
-M_InventoryLine_ID
-M_MovementLine_ID
-M_InOutLine_ID
-M_ProductionLine_ID
-C_ProjectIssue_ID
-M_AttributeSetInstance_ID
-QuantityOrder
-M_Product_Uom_Id
-C_UOM_ID
-M_Internal_Consumptionline_ID
-TrxProcessDate
-Checkreservedqty

The risk is minor as it only affects customizations which add new columns in M_Transaction table which need to update M_Storage_Detail table in case they are updated.
In this case, new customized trigger should be created to extend m_transaction_trg functionality and call m_inventory_update in case custom columns are updated.
N/A
Approved
blocks defect 00317723.0PR16Q2 closed aferraz Performance problem when you try to validate the costing rule with high volume of data 
Issue History
2016-01-28 10:38aferrazNew Issue
2016-01-28 10:38aferrazAssigned To => dmitry_mezentsev
2016-01-28 10:38aferrazModules => Core
2016-01-28 10:38aferrazTriggers an Emergency Pack => No
2016-01-28 10:41aferrazRelationship addedblocks 0031772
2016-01-29 14:41dmitry_mezentsevTag Attached: Approved
2016-01-29 14:41dmitry_mezentsevAssigned Todmitry_mezentsev => aferraz
2016-02-09 16:49dmiguelezStatusnew => scheduled
2016-02-09 16:50dmiguelezNote Added: 0084057
2016-02-09 16:50dmiguelezStatusscheduled => resolved
2016-02-09 16:50dmiguelezFixed in SCM revision => https://issues.openbravo.com/view.php?id=31876 [^]
2016-02-09 16:50dmiguelezResolutionopen => fixed
2016-02-09 16:50dmiguelezReview Assigned To => dmiguelez
2016-02-09 16:50dmiguelezNote Added: 0084058
2016-02-09 16:50dmiguelezStatusresolved => closed

Notes
(0084057)
dmiguelez   
2016-02-09 16:50   
Functional API Change, no change required.
The commit is the one that caused the API Change.
(0084058)
dmiguelez   
2016-02-09 16:50   
Functional API Changed Approved.