Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019680Openbravo ERPA. Platformpublic2012-02-07 12:422012-03-02 15:35
maite 
alostale 
urgentmajoralways
closedfixed 
5
 
3.0MP93.0MP9 
Core
No
0019680: Once "Save" button is pressed, it should be disabled in order to avoid duplications
Once "Save" button is pressed, it should be disabled in order to avoid duplications when network speed is slow or machine has performance problems
1. access slow environment
2. create Sales Invoice header and Save
3. add Sales Invoice line and press Save button several times
4. realize that sales invoice line has been duplicated
No tags attached.
related to defect 00199593.0MP10 closed alostale In old view (2.50 view, in 3.0 version) once "Save" button is pressed, it should be disabled in order to avoid duplications 
diff slow-add.diff (843) 2012-02-07 15:03
https://issues.openbravo.com/file_download.php?file_id=4959&type=bug
Issue History
2012-02-07 12:42maiteNew Issue
2012-02-07 12:42maiteAssigned To => alostale
2012-02-07 12:42maiteModules => Core
2012-02-07 12:43maiteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3140#r3140
2012-02-07 12:43maiteIssue Monitored: networkb
2012-02-07 12:43maiteTarget Version => 3.0MP9
2012-02-07 15:03alostaleFile Added: slow-add.diff
2012-02-07 15:04alostaleNote Added: 0044907
2012-02-07 16:27hgbotCheckin
2012-02-07 16:27hgbotNote Added: 0044909
2012-02-07 16:27hgbotStatusnew => resolved
2012-02-07 16:27hgbotResolutionopen => fixed
2012-02-07 16:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4182555aaeccf10dc21f416790dcbcbcf789bcc6 [^]
2012-02-07 16:38alostaleNote Added: 0044910
2012-02-07 19:23maiteNote Added: 0044922
2012-02-07 19:23maiteStatusresolved => closed
2012-02-08 18:19alostaleNote Added: 0044939
2012-02-08 18:19alostaleStatusclosed => new
2012-02-08 18:19alostaleResolutionfixed => open
2012-02-08 18:22hgbotCheckin
2012-02-08 18:22hgbotNote Added: 0044940
2012-02-08 18:22hgbotStatusnew => resolved
2012-02-08 18:22hgbotResolutionopen => fixed
2012-02-08 18:22hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/4182555aaeccf10dc21f416790dcbcbcf789bcc6 [^] => http://code.openbravo.com/erp/devel/pi/rev/7beead5709c73f571063ba8c6769f37a0a95ea0c [^]
2012-02-15 13:36dbazNote Added: 0045149
2012-02-15 13:36dbazStatusresolved => closed
2012-02-15 13:36dbazFixed in Version => 3.0MP9
2012-03-02 15:35hudsonbotCheckin
2012-03-02 15:35hudsonbotNote Added: 0045769
2012-03-02 15:35hudsonbotCheckin
2012-03-02 15:35hudsonbotNote Added: 0045778
2012-03-06 13:48jonalegriaesarteRelationship addedrelated to 0019959

Notes
(0044907)
alostale   
2012-02-07 15:04   
Can be reproduced in a normal env, applying the attached diff (slow-add.diff), creating new line in form view and clicking save twice in less than 4sec.
(0044909)
hgbot   
2012-02-07 16:27   
Repository: erp/devel/pi
Changeset: 4182555aaeccf10dc21f416790dcbcbcf789bcc6
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Feb 07 16:22:27 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4182555aaeccf10dc21f416790dcbcbcf789bcc6 [^]

fixed bug 19680: Saving new record now disables save button

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0044910)
alostale   
2012-02-07 16:38   
Provided solution shows disables save button and shows spinning button after clicking on it till dataset response arrives.

It affects a key component in the toolbar, but risk is reduced as the follow test cases cover all cases:

  -In the following situations, after click on save, spinning icon should be displayed in the save button and save and close should be diabled till the operation finishes, while in this situation, clicking the button again, should not have any effect:
    * New on form, click save
    * New on form, click save and close
    * New on grid, click on toolbar save (note also save button in grid is spinning and not clickable)
    * New on grid, click on save left side of record
    * Edit on form, click save
    * Edit on form, click save and close
    * Edit on grid, click on toolbar save (note also save button in grid is spinning and not clickable)
    * Edit on grid, click on save left side of record
  -Other events in toolbar that do dataset actions, do not affect save buttons status
    * Refresh
    * Delete
    * Write a new note
    * Attach file
(0044922)
maite   
2012-02-07 19:23   
verified
(0044939)
alostale   
2012-02-08 18:19   
Not working fine if the network is fast enough (less than 200ms to perform action and receive response) creating a new record in form view and saving makes the spinning icon not to disappear from save button.
(0044940)
hgbot   
2012-02-08 18:22   
Repository: erp/devel/pi
Changeset: 7beead5709c73f571063ba8c6769f37a0a95ea0c
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Feb 08 18:21:21 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7beead5709c73f571063ba8c6769f37a0a95ea0c [^]

fixed bug 19680: Fixed synchronization for showing spinning icon.

  Fixed the case of new in form in a fast enough network: spinning icon was not
  cleared after save.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js
---
(0045149)
dbaz   
2012-02-15 13:36   
Reviewed @ changeset 15482 - b84612a26a3
(0045769)
hudsonbot   
2012-03-02 15:35   
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/544d64e0c159 [^]

Maturity status: Test
(0045778)
hudsonbot   
2012-03-02 15:35   
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/544d64e0c159 [^]

Maturity status: Test