Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036461Openbravo ERPA. Platformpublic2017-07-10 18:112017-07-19 12:25
ngarcia 
alostale 
immediatemajoralways
closedfixed 
5
 
3.0PR17Q2.23.0PR17Q2.2 
caristu
Core
No
0036461: editing in grid record can be saved before callouts are applied
It is possible to save a record while editing it in grid before changes produced by callouts are applied to it, the result can be incorrect data being saved. This is easier to reproduce in case of slow network or slow callouts.
* Alternative 1

Using chrome, open Developer Tools - Network and set Network conditions to GPRS (500ms, 50kb/s, 20bk/s)

As group admin role:
   1.1. Create a Sales Quotation header
   1.2. Insert Row in grid mode
   1.3. Select a product, click on save button in grid and while loading click on Cancel changes toolbar button
     -> Check the line is saved but the prices and amounts remain on 0, the default tax has not been modified...


* Alternative 2
  2.1. Add artificial delay in SL_Order_Product callout code: Thread.sleep(5_000L);
  2.2. Create a Sales Quotation header
  2.2. Insert Row in grid mode
  2.3. Select a product, click on save button in grid
    -> Check the line is saved but the prices and amounts remain on 0, the default tax has not been modified...


Note if the same is performed in form view, save request is not performed until FIC response is received so that data is correct.
No tags attached.
blocks defect 0036454 closed alostale editing in grid record can be saved before callouts are applied 
Issue History
2017-07-11 15:07alostaleTypedefect => backport
2017-07-11 15:07alostaleTarget Version => 3.0PR17Q2.2
2017-07-14 08:16alostaleReview Assigned ToAugustoMauch => caristu
2017-07-14 08:17alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15506#r15506
2017-07-14 08:17hgbotCheckin
2017-07-14 08:17hgbotNote Added: 0098072
2017-07-14 08:17hgbotStatusscheduled => resolved
2017-07-14 08:17hgbotResolutionopen => fixed
2017-07-14 08:17hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q2.2/rev/8d8be0134611cf40cacdce126bec0f99dadb5be4 [^]
2017-07-19 12:25caristuNote Added: 0098131
2017-07-19 12:25caristuStatusresolved => closed
2017-07-19 12:25caristuFixed in Version => 3.0PR17Q2.2

Notes
(0098072)
hgbot   
2017-07-14 08:17   
Repository: erp/backports/3.0PR17Q2.2
Changeset: 8d8be0134611cf40cacdce126bec0f99dadb5be4
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jul 11 09:13:34 2017 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR17Q2.2/rev/8d8be0134611cf40cacdce126bec0f99dadb5be4 [^]

fixed bug 36461: in grid can trigger save before FIC response is received

  While editing in grid mode, it is possible to trigger save action by clicking
  grid's save button while FIC response is not received yet. If this occurs, the
  data sent to backend misses information that FIC should update.

  If grid's save button is clicked while in FIC call, postpone save action till
  FIC return.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0098131)
caristu   
2017-07-19 12:25   
Code reviewed + testing OK: now is not possible to save a record in grid view without the data calculated by the callouts.