Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035385Openbravo ERP09. Financial managementpublic2017-02-28 16:522017-03-25 01:51
ngarcia 
luisrs8608 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q2 
aferraz
Core
No
0035385: Error is shown when posting a goods movement with a transaction cost of 0
Error is shown when posting a goods movement with a transaction cost of 0
As group admin role:
   Create a new product
   Add a purchase price of 0 to it
   Create a goods receipt and add it
   Create a goods movement and move it from one storage bin to another
   Launch the costing background process and check it finishes successfully
   Try to Post it and check Posted error is shown
   try to Unpost it without selecting 'Delete accounting entry' option and check NoFactAccct error is shown
   try to Unpost it selecting 'Delete accounting entry' option and check Delete failed error is shown
No tags attached.
related to defect 00265033.0PR14Q3 closed AtulOpenbravo When trying to post a Physical Inventory with total cost = 0, Post status should be "Disabled for Accounting" 
Issue History
2017-02-28 16:52ngarciaNew Issue
2017-02-28 16:52ngarciaAssigned To => Triage Finance
2017-02-28 16:52ngarciaModules => Core
2017-02-28 16:52ngarciaResolution time => 1490050800
2017-02-28 16:52ngarciaTriggers an Emergency Pack => No
2017-02-28 16:53ngarciaIssue Monitored: networkb
2017-02-28 16:58ngarciaRelationship addedrelated to 0026503
2017-02-28 17:53markmm82Assigned ToTriage Finance => AtulOpenbravo
2017-03-07 20:32markmm82Assigned ToAtulOpenbravo => mcobas
2017-03-15 16:52luisrs8608Assigned Tomcobas => luisrs8608
2017-03-15 16:57luisrs8608Statusnew => scheduled
2017-03-16 17:46luisrs8608Note Added: 0095341
2017-03-23 15:10luisrs8608Note Edited: 0095341bug_revision_view_page.php?bugnote_id=0095341#r14879
2017-03-23 15:25luisrs8608Note Edited: 0095341bug_revision_view_page.php?bugnote_id=0095341#r14880
2017-03-23 15:26luisrs8608Note Added: 0095534
2017-03-23 15:28luisrs8608Note Added: 0095535
2017-03-23 15:29luisrs8608Note Added: 0095536
2017-03-24 15:09aferrazNote Deleted: 0095534
2017-03-24 15:09aferrazNote Deleted: 0095535
2017-03-24 15:09aferrazNote Deleted: 0095536
2017-03-24 15:10hgbotCheckin
2017-03-24 15:10hgbotNote Added: 0095563
2017-03-24 15:10hgbotStatusscheduled => resolved
2017-03-24 15:10hgbotResolutionopen => fixed
2017-03-24 15:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ee5bf188484a37280cb6fac9463e0e1bd12d2869 [^]
2017-03-24 15:20aferrazReview Assigned To => aferraz
2017-03-24 15:20aferrazNote Added: 0095564
2017-03-24 15:20aferrazStatusresolved => closed
2017-03-24 15:20aferrazFixed in Version => 3.0PR17Q2
2017-03-25 01:51hudsonbotCheckin
2017-03-25 01:51hudsonbotNote Added: 0095580

Notes
(0095341)
luisrs8608   
2017-03-16 17:46   
(edited on: 2017-03-23 15:25)
Test Plan to test Goods Movement with zero transaction cost, with uncalculated cost and non-zero cost

As group admin role:
1. Create a new product.
2. Add a purchase price of 0 to it.
3. Create a goods receipt and add it.
4. Create a goods movement and move it from one storage bin to another.
5. Launch the costing background process and check it finishes successfully.
6. Try to Post it and check a Error message is shown: "Document disabled for accounting" and the status of the document was changed to Document Disabled.

7. Create a goods receipt and add a product with purchase price different to 0.
8. Create a goods movement and move it from one storage bin to another.
9. Try to Post it and check a Error message is shown: "The cost of the product has not been calculated".

10. Create a goods receipt and add a product with purchase price different to 0.
11. Create a goods movement and move it from one storage bin to another.
12. Launch the costing background process and check it finishes successfully.
13. Click in Post. The status of the document was changed to Posted.

(0095563)
hgbot   
2017-03-24 15:10   
Repository: erp/devel/pi
Changeset: ee5bf188484a37280cb6fac9463e0e1bd12d2869
Author: Luis <luisrs8608 <at> gmail.com>
Date: Thu Mar 23 09:49:00 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/ee5bf188484a37280cb6fac9463e0e1bd12d2869 [^]

Fixes issue 35385: Error is shown when posting a Goods Movement with a 0 cost

When it was a matter of posting a Goods Movements with zero cost, it showed
'Posted error', and in spite of this it was tried to post the document leaving
it in an inconsistent state, when testing the option Unpost an exception was
fired because it was to eliminate the lines When these were not created.

To solve this when it comes to posting a Goods Movements, it is validated that
all lines of this have a cost other than zero or cost null, in case this
condition is not met, the document is changed to Document Disabled and returned
False interrupting the post process since the cost of its lines has zero value.

---
M src/org/openbravo/erpCommon/ad_forms/DocMovement.java
---
(0095564)
aferraz   
2017-03-24 15:20   
Code review + Testing OK
(0095580)
hudsonbot   
2017-03-25 01:51   
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/a169bf5db5fd [^]
Maturity status: Test