Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0027395Openbravo ERP03. Procurement managementpublic2014-08-20 20:102015-02-04 20:33
dmiguelez 
dmiguelez 
normalminoralways
closedfixed 
20Community Appliance
 
 
Core
No
0027395: Add information to Product Window about on Hand Stock and unitary Cost
Add information to Product Window about on Hand Stock and unitary Cost

Functional Specs:
- Add a Tab below Product Window to show the on Hand Stock of a Product, it's valuation and it's uniaty Cost.
- This information must match the Valued Stock report.
- This information should be updated each time the Stock of a Product or it's valuation changes.
- This information should be filled without any action from the user side.
- There should be a Process to Reset this information.

Technical Specs:
- Create a new Table and define it in AD to store the information. Create a new Tab also.
- Update the information of this Table using a trigger in the m_transaction and another one in the m_transaction_cost
  - The trigger in the m_transaction will update the Stock and the unitary Cost.
  - The trigger in the m_transaction_cost will update the Stock Valuation and the unitary Cost (This allow to support Cost Adjustments).
- Create a ModuleScript to fill the information the first time.
- Create a Process to Reset the information.
Add information to Product Window about on Hand Stock and unitary Cost

Functional Specs:
- Add a Tab below Product Window to show the on Hand Stock of a Product, it's valuation and it's uniaty Cost.
- This information must match the Valued Stock report.
- This information should be updated each time the Stock of a Product or it's valuation changes.
- This information should be filled without any action from the user side.
- There should be a Process to Reset this information.

Technical Specs:
- Create a new Table and define it in AD to store the information. Create a new Tab also.
- Update the information of this Table using a trigger in the m_transaction and another one in the m_transaction_cost
  - The trigger in the m_transaction will update the Stock and the unitary Cost.
  - The trigger in the m_transaction_cost will update the Stock Valuation and the unitary Cost (This allow to support Cost Adjustments).
- Create a ModuleScript to fill the information the first time.
- Create a Process to Reset the information.
No tags attached.
Issue History
2014-08-20 20:10dmiguelezNew Issue
2014-08-20 20:10dmiguelezAssigned To => dmiguelez
2014-08-20 20:10dmiguelezModules => Core
2014-08-20 20:10dmiguelezTriggers an Emergency Pack => No
2014-12-15 09:55psarobeNote Added: 0072490
2015-01-07 09:52hgbotCheckin
2015-01-07 09:52hgbotNote Added: 0073318
2015-01-07 09:52hgbotStatusnew => resolved
2015-01-07 09:52hgbotResolutionopen => fixed
2015-01-07 09:52hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6f9cc94e865d78d07ee0cf1a20fff7bf8ed8abe5 [^]
2015-01-07 09:53hgbotCheckin
2015-01-07 09:53hgbotNote Added: 0073319
2015-01-07 09:53hgbotCheckin
2015-01-07 09:53hgbotNote Added: 0073320
2015-01-21 19:46dbazIssue Monitored: dbaz
2015-02-04 10:03dmiguelezNote Added: 0074069
2015-02-04 10:03dmiguelezStatusresolved => closed
2015-02-04 20:33hudsonbotCheckin
2015-02-04 20:33hudsonbotNote Added: 0074113
2015-02-04 20:33hudsonbotCheckin
2015-02-04 20:33hudsonbotNote Added: 0074114
2015-02-04 20:33hudsonbotCheckin
2015-02-04 20:33hudsonbotNote Added: 0074115

Notes
(0072490)
psarobe   
2014-12-15 09:55   
http://wiki.openbravo.com/wiki/Projects:Stock_Valuation#Stock_Valuation [^]
(0073318)
hgbot   
2015-01-07 09:52   
Repository: erp/devel/pi
Changeset: 6f9cc94e865d78d07ee0cf1a20fff7bf8ed8abe5
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Nov 11 17:32:58 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/6f9cc94e865d78d07ee0cf1a20fff7bf8ed8abe5 [^]

Fixes Issue 27395. Implements feat. Req. to add info about Product Unit Cost.

*Adds a new Table named M_Stock_Valuation to store Stock, Stock Valuation
  and Unit Cost of a Product.
*Adds ModuleScript to fill this Table for existing Data.
*Adds Process to Reset this Table
*Modifies M_Transaction_Trg and adds M_Transaction_Cost_Trg to Update
  the values of M_Stock_Valuation Table when Stock is introduced
  and when the Cost is calculated or adjusted.
*Modifes M_Product_Trg to initialize the information of this Table
  when the Product is created.

---
M src-db/database/model/triggers/M_PRODUCT_TRG.xml
M src-db/database/model/triggers/M_TRANSACTION_TRG.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_DATASET_TABLE.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src-db/database/sourcedata/AD_TAB.xml
M src-db/database/sourcedata/AD_TABLE.xml
M src-db/database/sourcedata/AD_TREENODE.xml
M src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
M src-db/database/sourcedata/OBUIAPP_PROCESS.xml
M src-db/database/sourcedata/OBUISEL_SELECTOR.xml
M src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
A src-db/database/model/functions/M_INITIALIZE_STOCK_VALUATION.xml
A src-db/database/model/functions/M_UPDATE_STOCK_VALUATION.xml
A src-db/database/model/tables/M_STOCK_VALUATION.xml
A src-db/database/model/triggers/M_TRANSACTION_COST_TRG.xml
A src/org/openbravo/costing/ResetStockValuation.java
---
(0073319)
hgbot   
2015-01-07 09:53   
Repository: erp/devel/pi
Changeset: 87b0a4144cc7c3fb09a66460f7db516c83631d0b
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Dec 17 19:06:50 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/87b0a4144cc7c3fb09a66460f7db516c83631d0b [^]

Related to Issue 27395. Compatibility issues with oracle. Reset on cur change

- When the currency of a legal entity is changed the unit costs are deleted
  and a message is prompt to the user to recalculate them again.
- Several performance issues in triggers and procedures.
- Modified organization selector to remove HQL query.

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java
M src-db/database/model/functions/M_INITIALIZE_STOCK_VALUATION.xml
M src-db/database/model/functions/M_UPDATE_STOCK_VALUATION.xml
M src-db/database/model/triggers/AD_ORG_TRG.xml
M src-db/database/model/triggers/M_PRODUCT_TRG.xml
M src-db/database/model/triggers/M_TRANSACTION_COST_TRG.xml
M src-db/database/model/triggers/M_TRANSACTION_TRG.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/OBUISEL_SELECTOR.xml
M src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
M src/org/openbravo/costing/ResetStockValuation.java
A modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-onchange-functions.js
---
(0073320)
hgbot   
2015-01-07 09:53   
Repository: erp/devel/pi
Changeset: 401f1e9fc80d500efca26d5a759fc26088c8f1e2
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Mon Jan 05 12:18:46 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/401f1e9fc80d500efca26d5a759fc26088c8f1e2 [^]

Related to Issue 27395. Fix issue when calculating several trx

When calculating more than one transaction of the same product the first
transaction value amount is not considered.
Add a coalesce on the trigger for the cost amount
Do incremental updates instead of calculating the total amount.

---
M src-db/database/model/functions/M_UPDATE_STOCK_VALUATION.xml
M src-db/database/model/triggers/M_TRANSACTION_COST_TRG.xml
---
(0074069)
dmiguelez   
2015-02-04 10:03   
Code Review + Testing Ok
(0074113)
hudsonbot   
2015-02-04 20:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test
(0074114)
hudsonbot   
2015-02-04 20:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test
(0074115)
hudsonbot   
2015-02-04 20:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test