Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033489Openbravo ERP09. Financial managementpublic2016-07-15 14:432016-08-11 18:40
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q4 
aferraz
Core
No
0033489: Cannot post a cost adjustment if the period was created in a version previous to 3.0PR14Q4
Cannot post a cost adjustment if the period was created in a version previous to 3.0PR14Q4. Records in C_PERIODCONTROL tab are included when creating a record in the C_PERIOD table (C_PERIOD_TRG trigger) or when setting an organization as ready (AD_ORG_READY function). The CAD docbase type was included in 3.0PR14Q4
   Install a version previous to 3.0PR14Q4
   Create the 2016 year and periods
   Upgrade the instance to any version after 3.0PR14Q4
   Create the Cost Adjustment document in case it does not exist
   Go to the last transaction of a product (Product - Transactions tab) and add a Manual Cost Adjusment
   Check a new record has been created in Cost Adjustment window
   Try to post it and check the following error message is shown:
      The Period does not exist or it is not opened
   Go to Open/Close Period Control and check the Cost Adjustment document category is not available for the current period (2016)
   Create a new year and its periods
   Check the Cost Adjustment document category is not available for that periods
No tags attached.
diff 33489.diff (3,149) 2016-08-02 21:31
https://issues.openbravo.com/file_download.php?file_id=9670&type=bug
? CreateAccountingConfiguration.class (3,499) 2016-08-02 21:32
https://issues.openbravo.com/file_download.php?file_id=9671&type=bug
Issue History
2016-07-15 14:43ngarciaNew Issue
2016-07-15 14:43ngarciaAssigned To => Triage Finance
2016-07-15 14:43ngarciaModules => Core
2016-07-15 14:43ngarciaResolution time => 1470348000
2016-07-15 14:43ngarciaTriggers an Emergency Pack => No
2016-07-15 14:43ngarciaIssue Monitored: networkb
2016-07-18 17:13markmm82Statusnew => scheduled
2016-07-18 17:41aferrazAssigned ToTriage Finance => markmm82
2016-08-02 21:16markmm82Note Added: 0088758
2016-08-02 21:30markmm82Note Edited: 0088758bug_revision_view_page.php?bugnote_id=0088758#r12773
2016-08-02 21:31markmm82File Added: 33489.diff
2016-08-02 21:32markmm82File Added: CreateAccountingConfiguration.class
2016-08-09 09:07hgbotCheckin
2016-08-09 09:07hgbotNote Added: 0088914
2016-08-09 09:07hgbotStatusscheduled => resolved
2016-08-09 09:07hgbotResolutionopen => fixed
2016-08-09 09:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6e46a5541bbdd5318f9bda7f25cded92e332094b [^]
2016-08-09 09:11aferrazReview Assigned To => aferraz
2016-08-09 09:11aferrazNote Added: 0088915
2016-08-09 09:11aferrazStatusresolved => closed
2016-08-09 09:11aferrazFixed in Version => 3.0PR16Q4
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0089049

Notes
(0088758)
markmm82   
2016-08-02 21:16   
(edited on: 2016-08-02 21:30)
Test Plan
1. Install a version previous to 3.0PR14Q4, for instance 3.0PR14Q3.7
2. Create the 2016 year and periods
3. Go to Open/Close Period Control and check the "Cost Adjustment Document" category is NOT available for the current period (2016). That is because the Cost Adjustments feature was included in Openbravo 3.0PR14Q4.
4. Upgrade the instance to last on pi. Apply the patch with the solution of this issue (you can find it attached, be sure that .class is updated). It have updates to the module script to add the CAD document to the period when the instance is upgraded.
5. Run update.database and compile.complete tasks.
6. Cost Adjustments feature was included in Openbravo 3.0PR14Q4. That's why it is required to apply the new dataset to the corresponding organization. For example "F&B EspaƱa S.A".
7. Go to Open/Close Period Control window, select the 2016 period and check the "Cost Adjustment Document" category is now available for the current period (2016).
8. Open the periods.
9. Go to the Product window select "Cerveza Ale 0,5 L"
10. Go to "Transactions" tab and order by "Transaction Process Date" column in order to select the last transaction
11. Add a Manual Cost Adjusment to it.
   Total Cost Amount = 1000.00
   Accounting Date = today (for instance 18-07-2016)
   Incremental = YES
12. Check a new record has been created in Cost Adjustment window
13. Try to post it and check the process finish successfully!!! (A valid Conversion rate must be defined)

(0088914)
hgbot   
2016-08-09 09:07   
Repository: erp/devel/pi
Changeset: 6e46a5541bbdd5318f9bda7f25cded92e332094b
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Aug 03 09:52:57 2016 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/6e46a5541bbdd5318f9bda7f25cded92e332094b [^]

Fixes issue 33489: Can't post CAD if period was created previous to 3.0PR14Q4

Cost Adjustments feature was included in Openbravo 3.0PR14Q4, so periods created in lower versions doesn't includes the Cost Adjustment Document. When the instance is upgrated, these periods was not updated and it causes that CAD can't be posted. To include this document to all these periods was updated the CreateAccountingConfiguration module script to take into account control periods that has not included the CAD. Also was updated the Module Script Execution Limits to the 29718 version.

---
M modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.class
M modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java
---
(0088915)
aferraz   
2016-08-09 09:11   
Code review + Testing OK
(0089049)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test