Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020474Openbravo ERPA. Platformpublic2012-05-11 12:502012-05-28 13:56
xabiermerino 
mtaal 
immediatemajorhave not tried
closedfixed 
5
pi 
3.0MP12 
Core
No
0020474: When you save a register in grid view, amounts fields change to the previous value
When you save a register in grid view amounts fields change to 0
Example 1:
- As admin create a sales invoice and go to lines
- Save a line in form view.
- Change the Invoiced Quantity and the Net Unit Price in grid view
- Save the line (using the save button of the file or the button of the toolbar)
- Realize that thes fields change to the previous value

Example 2:
- Go to financial account and insert a row
- Introduce a 100 as Current Balance
- Save
- Realize that the current balance is 0
Regression QA
has duplicate defect 0020500 closed alostale Price List values roll back to old values 
has duplicate defect 00205193.0MP12 closed mtaal Line created in grid is not saved when navigating back to header 
related to defect 0020524 closed Sandrahuguet get a null error when saving an invoice line 
related to defect 0031901 closed caristu decimal value can't be changed by trigger/observer after manual edition in form view 
related to defect 0032668 closed alostale Wrong Total Gross Amount, Total Net Amount and Tax information is obtained in order and invoices 
related to defect 0036454 closed alostale editing in grid record can be saved before callouts are applied 
diff 20474.diff (16,646) 2012-05-16 11:59
https://issues.openbravo.com/file_download.php?file_id=5232&type=bug
Issue History
2012-05-11 12:50xabiermerinoNew Issue
2012-05-11 12:50xabiermerinoAssigned To => alostale
2012-05-11 12:50xabiermerinoModules => Core
2012-05-11 14:33xabiermerinoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3457#r3457
2012-05-11 14:38jonalegriaesarteTag Attached: Regression QA
2012-05-13 22:46hgbotCheckin
2012-05-13 22:46hgbotNote Added: 0048599
2012-05-13 22:46hgbotStatusnew => resolved
2012-05-13 22:46hgbotResolutionopen => fixed
2012-05-13 22:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3e863f6c3a4141923d62e4ee0699e8111da5b9d5 [^]
2012-05-15 08:51alostaleRelationship addedhas duplicate 0020500
2012-05-15 18:01alostaleAssigned Toalostale => mtaal
2012-05-15 18:01alostaleNote Added: 0048662
2012-05-15 18:01alostaleStatusresolved => new
2012-05-15 18:01alostaleResolutionfixed => open
2012-05-15 23:02dbazRelationship addedrelated to 0020519
2012-05-16 11:42mtaalNote Added: 0048686
2012-05-16 11:50mtaalNote Added: 0048687
2012-05-16 11:50mtaalFile Added: 20474.diff
2012-05-16 11:51mtaalFile Deleted: 20474.diff
2012-05-16 11:59mtaalFile Added: 20474.diff
2012-05-16 12:02mtaalNote Added: 0048690
2012-05-17 09:16SandrahuguetRelationship addedrelated to 0020524
2012-05-17 11:57hgbotCheckin
2012-05-17 11:57hgbotNote Added: 0048725
2012-05-17 11:57hgbotStatusnew => resolved
2012-05-17 11:57hgbotResolutionopen => fixed
2012-05-17 11:57hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/3e863f6c3a4141923d62e4ee0699e8111da5b9d5 [^] => http://code.openbravo.com/erp/devel/pi/rev/a821c504f959ae2b8f3eb1fd69af1964b69951ad [^]
2012-05-17 11:58mtaalRelationship replacedhas duplicate 0020519
2012-05-25 12:11hudsonbotCheckin
2012-05-25 12:11hudsonbotNote Added: 0049107
2012-05-25 12:12hudsonbotCheckin
2012-05-25 12:12hudsonbotNote Added: 0049155
2012-05-28 13:56AugustoMauchNote Added: 0049369
2012-05-28 13:56AugustoMauchStatusresolved => closed
2012-05-28 13:56AugustoMauchFixed in Version => 3.0MP12
2016-01-25 12:52caristuRelationship addedrelated to 0031901
2016-04-26 09:30alostaleRelationship addedrelated to 0032668
2017-07-11 09:05alostaleRelationship addedrelated to 0036454

Notes
(0048599)
hgbot   
2012-05-13 22:46   
Repository: erp/devel/pi
Changeset: 3e863f6c3a4141923d62e4ee0699e8111da5b9d5
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun May 13 22:46:18 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3e863f6c3a4141923d62e4ee0699e8111da5b9d5 [^]

Fixes issue 20474: When you save a register in grid view, amounts fields change to the previous value
The wrong id was used to get the editvalues object of a row, the rownumber should be used.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0048662)
alostale   
2012-05-15 18:01   
Still can be reproduced following scenarios in steps to reproduce as well as the reported in 0020500
(0048686)
mtaal   
2012-05-16 11:42   
The bug/issue occurs but example 2 is not completely valid. The value can be set but after save it is set back to zero, this is because of logic in triggers probably.
This can be seen in main also. So example 2 can not be used to reproduce this issue.
For another example see this issue:
https://issues.openbravo.com/view.php?id=20500 [^]

gr. Martin
(0048687)
mtaal   
2012-05-16 11:50   
Note this issue occurs because in the ListGrid.js the getEditValues method always returns a new object, so not the object internally used in the ListGrid. This means that any changes made to the edit values object returned from getEditValues are not persisted/retained.
See here:
http://forums.smartclient.com/showthread.php?p=86378#post86378 [^]

To solve this direct access to the edit values object should not be done, the attached diff repairs this. But as the changes are in several places I will wait applying it until Isomorphic replies to the thread above.

gr. Martin
(0048690)
mtaal   
2012-05-16 12:02   
Note the attached diff has not been tested extensively, this needs to be done. The following needs to be tested:
- date field in form/grid editing (autocomplete and pick a date from the calendar)
- password field in grid editing and form editing
- fields with a FicCall, test this with a simulated slow network like this for example:
(https://issues.openbravo.com/view.php?id=20328 [^])
In order to simulate a slow network, place a Thread.sleep(2000) in the execute method of the FIC. Then do the following:
    Place the Thread.sleep(2000) in the FIC
    Open the Sales Order window
    Create a new record in the grid
    Select a Business Partner and immediately click in the Lines Tab

- test issue 20500
- test issue 20519
(0048725)
hgbot   
2012-05-17 11:57   
Repository: erp/devel/pi
Changeset: a821c504f959ae2b8f3eb1fd69af1964b69951ad
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu May 17 11:56:12 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a821c504f959ae2b8f3eb1fd69af1964b69951ad [^]

Fixes issue 20474: When you save a register in grid view, amounts fields change to the previous value
Object returned from ListGrid.getEditValues can't be used directly always go through the ListGrid api
For example: ListGrid.setEditValue

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-encrypted.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
---
(0049107)
hudsonbot   
2012-05-25 12:11   
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/5401e185a8b0 [^]

Maturity status: Test
(0049155)
hudsonbot   
2012-05-25 12:12   
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/5401e185a8b0 [^]

Maturity status: Test
(0049369)
AugustoMauch   
2012-05-28 13:56   
Code reviewed and verified in pi@ff800550e531