Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039710Openbravo ERPZ. Otherspublic2018-11-28 15:012018-12-13 15:31
joniturralde93 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
pi 
pi3.0PR19Q1 
Sandrahuguet
Core
No
0039710: Landed cost can be reactivated TWICE
Landed cost can be reactivated twice if done at the exact same time in two different sessions. This cannot be fixed in any way by the user.
- Go to https://livebuilds.openbravo.com/erp_pi_pgsql/ [^]
- Open Landed Cost Type window
- Create a new record: Organization=*, Name=Capital Social, Account=Capital Social
- Open Landed Cost window
- Create a new record: Organization=F&B España - Región Norte, Document Type=Landed Cost
- Create a new record in subtab Cost: Document Type=Landed Cost Cost, Landed Cost Type=Capital Social, Amount=200
- Create a new record in subtab Receipt: Goods Receipt=10000111 - 27-03-2013 - Refrescos Naturales, S.A
- Click on Landed Cost header and press Process button.
- Now navigate to the Goods Receipt assigned to the Receipt subtab: 10000111 - 27-03-2013 - Refrescos Naturales, S.A
- Open a line (Bebida Energética 0.5L) and go to Linked Items
- Open the record on Master Data Management || Product - Transactions
- You can check that, in subtab Transaction Costs, it was added a line which increases the amount.
- Now, go back to the created Landed Cost and reactivate it from two different sessions at the same exact time (you have a 1 second window or so, we reproduced it with two different laptops)
- Go back to the Product-Transactions-Transaction Costs subtab.
- Usually, this 'Reactivate' button creates another line with negative amount, but this way it created two (this cannot be fixed in any way).
No tags attached.
Issue History
2018-11-28 15:01joniturralde93New Issue
2018-11-28 15:01joniturralde93Assigned To => Triage Finance
2018-11-28 15:01joniturralde93Modules => Core
2018-11-28 15:01joniturralde93Resolution time => 1545174000
2018-11-28 15:01joniturralde93Triggers an Emergency Pack => No
2018-11-28 15:10martinsdanIssue Monitored: martinsdan
2018-11-28 15:15SandrahuguetAssigned ToTriage Finance => AtulOpenbravo
2018-11-28 17:20AtulOpenbravoStatusnew => scheduled
2018-12-12 05:56AtulOpenbravoNote Added: 0108523
2018-12-12 06:02AtulOpenbravoNote Edited: 0108523bug_revision_view_page.php?bugnote_id=0108523#r18025
2018-12-12 13:16ngarciaIssue Monitored: ngarcia
2018-12-13 11:11hgbotCheckin
2018-12-13 11:11hgbotNote Added: 0108577
2018-12-13 11:11hgbotStatusscheduled => resolved
2018-12-13 11:11hgbotResolutionopen => fixed
2018-12-13 11:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/29bb5d02e0fee1713c731f8e7eb108f3608b4c19 [^]
2018-12-13 11:15SandrahuguetReview Assigned To => Sandrahuguet
2018-12-13 11:15SandrahuguetNote Added: 0108578
2018-12-13 11:15SandrahuguetStatusresolved => closed
2018-12-13 11:15SandrahuguetFixed in Version => 3.0PR19Q1
2018-12-13 15:31hudsonbotCheckin
2018-12-13 15:31hudsonbotNote Added: 0108588

Notes
(0108523)
AtulOpenbravo   
2018-12-12 05:56   
(edited on: 2018-12-12 06:02)
- Login as F&B International Group Admin.
- Open Landed Cost Type window
- Create a new record: Organization=*, Name=Capital Social, Account=Capital Social
- Open Landed Cost window
- Create a new record: Organization=F&B España - Región Norte, Document Type=Landed Cost
- Create a new record in subtab Cost: Document Type=Landed Cost Cost, Landed Cost Type=Capital Social, Amount=200
- Create a new record in subtab Receipt: Goods Receipt=10000111 - 27-03-2013- Refrescos Naturales, S.A, Receipt Line: 10000111 - 27-03-2013 - Refrescos Naturales, S.A. - 20 - Bebida Energética 0,5L - 10000.00
- Click on Landed Cost header, click process button and wait.
- Open a other browser or new incognito window.
- Login and open same landed cost record, click process button and wait.
- Try to click Done button in both browser parrallely.
- One browser shows "Process Completely successfully" and other shows error "Another Process for this record is active, please unlock it" message.
- Now in the similar way try to reactivate Landed Cost from two different browser or incognito window.
- In one browser document is reactivated successfully and in the other one error is shown as "Another Process for this record is active, please unlock it".

(0108577)
hgbot   
2018-12-13 11:11   
Repository: erp/devel/pi
Changeset: 29bb5d02e0fee1713c731f8e7eb108f3608b4c19
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Dec 13 00:01:44 2018 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/29bb5d02e0fee1713c731f8e7eb108f3608b4c19 [^]

Fixes Issue 0039710: Landed cost can be reactivated TWICE

** Inorder to avoid process or reactivate twice, processing flag
is used for locking mechanism. At the beginning check is done
whether the flag is checked, if yes error is shown else flag is
set as Yes and process or reactivate action proceeds. At the end
flag is reset as No.
** Checking of processed flag or document status (Draft) is also
done while reactivation process whether the landed cost is
reactivated by other process.

---
M src/org/openbravo/costing/LandedCostProcessHandler.java
M src/org/openbravo/costing/ReactivateLandedCost.java
---
(0108578)
Sandrahuguet   
2018-12-13 11:15   
Code review + testing OK
(0108588)
hudsonbot   
2018-12-13 15:31   
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/cc7720ccbe48 [^]
Maturity status: Test