Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035389Openbravo ERPZ. Otherspublic2017-02-28 19:152024-08-09 14:33
gnudebian1991 
AtulOpenbravo 
highmajoralways
scheduledopen 
30Professional Appliance
main 
 
Google Chrome
Core
No
0035389: Concurrent modification of the same Sales Order by two different users can lead to inconsistent data
If two different users access the same Sales Order record and do the following:

 -First user enters a new product line and saves the record.This action modifies the Total Gross Amount and Total Net Amount of the header but doesnt update the updated column of the header.
 -Second user edits any field of the header and saves the record. Since this user didnt refresh before editing he has the old values for Total Gross Amount and Total Net Amount, this action will overwrite these values.

This will produce inconsistent data since the sum of the order lines doesnt equal the amounts shown in the header.

This happens because the updated column of all the tables doesnt get updated if the change comes from database triggers. The StaleDate validation in JsonToDataConverted.java doesnt support this case.
1.-Create a new sales order and save.
2.-Enter the sales order header in form mode with a web browser.
3.-Enter the sales order header in form mode with another web browser.
4.-In the first web browser enter a new line and save.
5.-In the second web browser change the Order Reference in the header and save.

If we refresh the sales order we can see Total Gross Amount=0 and Total Net Amount=0 but we have one line with amounts.
No tags attached.
diff FixesIssue35389.diff (5,024) 2024-08-09 14:33
https://issues.openbravo.com/file_download.php?file_id=20083&type=bug
Issue History
2017-02-28 19:15gnudebian1991New Issue
2017-02-28 19:15gnudebian1991Assigned To => Triage Finance
2017-02-28 19:15gnudebian1991Web browser => Google Chrome
2017-02-28 19:15gnudebian1991Modules => Core
2017-02-28 19:15gnudebian1991Triggers an Emergency Pack => No
2017-03-06 12:58maiteWeb browserGoogle Chrome => Google Chrome
2017-10-13 10:34dmiguelezAssigned ToTriage Finance => AtulOpenbravo
2017-10-17 04:08AtulOpenbravoStatusnew => scheduled
2017-10-17 04:49AtulOpenbravoNote Added: 0099922
2024-08-09 14:33aferrazWeb browserGoogle Chrome => Google Chrome
2024-08-09 14:33aferrazNote Added: 0167926
2024-08-09 14:33aferrazSeveritycritical => major
2024-08-09 14:33aferrazNote Added: 0167927
2024-08-09 14:33aferrazFile Added: FixesIssue35389.diff

Notes
(0099922)
AtulOpenbravo   
2017-10-17 04:49   
- Login as F&B International Group Admin
- Create a new sales order header and save.
- Open the sales order header in form view in a web browser.
- Open previous sales order header in form view in another web browser.
- In the first web browser, add a new line to previous order and save.
- In the second web browser change the Order Reference field in the header and try to save it.
- Error message is shown as
  Error
  Saving failed. The record you are saving has already been changed by another user or process. Cancel your changes and refresh the data by clicking the refresh button.

- Login as F&B International Group Admin
- Create a new sales invoice header and save.
- Open the sales invoice header in form view in a web browser.
- Open previous sales invoice header in form view in another web browser.
- In the first web browser, add a new line to previous invoice and save.
- In the second web browser change the Description field in the header and try to save it.
- Error message is shown as
  Error
  Saving failed. The record you are saving has already been changed by another user or process. Cancel your changes and refresh the data by clicking the refresh button.

- Login as F&B International Group Admin
- Create a new sales invoice header and save.
- Open the sales invoice header in form view in a web browser.
- Open previous sales invoice header in form view in another web browser.
- In the first web browser, add a new line to previous invoice and save.
- Navigate to Tax Tab, add a tax line, set Taxable Amount and Tax Amount.
- In the second web browser change the Description field in the header and try to save it.
- Error message is shown as
  Error
  Saving failed. The record you are saving has already been changed by another user or process. Cancel your changes and refresh the data by clicking the refresh button.
(0167926)
aferraz   
2024-08-09 14:33   
Changing severity to major following https://wiki.openbravo.com/wiki/Bug_Reporting_Guidelines#How_to_Choose_the_Right_Severity [^]
(0167927)
aferraz   
2024-08-09 14:33   
Attached a possible fix.