Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020869Openbravo ERPA. Platformpublic2012-06-26 12:482012-06-30 05:10
psarobe 
AugustoMauch 
immediatemajoralways
closedfixed 
5
pi 
3.0MP133.0MP12.1 
Core
Production - QA Approved
2012-05-13
yes
0020869: Change dates in the grid is not working fine. The UI shows the dates changed but in the DB have not being changed
Change dates in the grid is not working fine. The UI shows the dates changed but in the DB have not being changed

See attaches
1. Go to sales order window
2. Unbook several sales order
3. Change the order date and book every sales order
4. At some point something happens and for some of the orders the order date does not get changed in DB but in the UI so this mislead the end user

The problem happens when you use the arrow-down to save/move across records to change the dates

If you change the mouse to move/save across records it works fine or using the save button
No tags attached.
jpg create_shipment_from_orders.JPG (92,965) 2012-06-26 13:43
https://issues.openbravo.com/file_download.php?file_id=5329&type=bug
jpg

jpg sales_order.JPG (154,743) 2012-06-26 13:43
https://issues.openbravo.com/file_download.php?file_id=5330&type=bug
jpg
Issue History
2012-06-26 12:48psarobeNew Issue
2012-06-26 12:48psarobeAssigned To => AugustoMauch
2012-06-26 12:48psarobeModules => Core
2012-06-26 12:56psarobeSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3572#r3572
2012-06-26 13:43psarobeFile Added: create_shipment_from_orders.JPG
2012-06-26 13:43psarobeFile Added: sales_order.JPG
2012-06-26 17:28plujanRegression level => Production - QA Approved
2012-06-26 17:53shuehnerNote Added: 0050104
2012-06-26 19:36shuehnerIssue Monitored: shuehner
2012-06-27 19:18AugustoMauchRegression date => 2012-05-13
2012-06-27 19:18AugustoMauchRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/8f6f2842e1f05bde4cd68f5a75ea7bbc20f3580b [^]
2012-06-27 19:23AugustoMauchNote Added: 0050196
2012-06-28 14:02mtaalNote Added: 0050255
2012-06-28 16:32hgbotCheckin
2012-06-28 16:32hgbotNote Added: 0050257
2012-06-28 16:32hgbotStatusnew => resolved
2012-06-28 16:32hgbotResolutionopen => fixed
2012-06-28 16:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e40f0602d615e083538c3651c6c2fea6c7a1379e [^]
2012-06-28 16:46AugustoMauchNote Added: 0050259
2012-06-29 16:57marvintmStatusresolved => closed
2012-06-29 16:57marvintmFixed in Version => 3.0MP12.1
2012-06-30 05:10hudsonbotCheckin
2012-06-30 05:10hudsonbotNote Added: 0050292

Notes
(0050104)
shuehner   
2012-06-26 17:53   
Can be reproduced in MP12 but not in MP11
(0050196)
AugustoMauch   
2012-06-27 19:23   
In order for this to work, the updateValue function of the date item must be called before OBViewGrid.saveEditedValues, otherwise it will fetch the old date item value.

This used to work because prior to the fix of 16502, a call to selectedItem.blur() was done before calling Super('cellEditEnd'). That fix moved the call to blur after the call to Super('cellEditEnd'), so saveEditedValues is fetching the yet-to-be-updated value.
(0050255)
mtaal   
2012-06-28 14:02   
Hi Augusto,
I would add this call to
this.storeUpdatedEditorValue()

either in celleditend of in saveeditedvalues

Can you check if that helps?

gr. Martin
(0050257)
hgbot   
2012-06-28 16:32   
Repository: erp/devel/pi
Changeset: e40f0602d615e083538c3651c6c2fea6c7a1379e
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Jun 28 16:31:17 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e40f0602d615e083538c3651c6c2fea6c7a1379e [^]

Fixes issue 20869: Dates are properly saved in the grid

Due to the flags the prevent OBDateItem.updateValue from being called in certain conditions, it was not being executed on ListGrid.cellEditEnd. This has been changed to ensure that the date will be updated before sending its value to the datasource.

---
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/grid/ob-view-grid.js
---
(0050259)
AugustoMauch   
2012-06-28 16:46   
The only change introduced by the fix is that now there is an extra call to updateValue when calling OBViewGrid.cellEditEnd.

Test plan:
- Add a new record in the grid view. Select a date with the picker and save the row by:
      *Clicking the save row button
      *Using the shortcut Ctrl+S
      *Clicking the up or down arrow button to move to another record
      *Clicking in another tab
- Repeat the previous steps but entering the date manually, not with the picker.
- Repeat the previous steps but editing an existing record.
- After every change, check that change is actually done by using the filter.
(0050292)
hudsonbot   
2012-06-30 05:10   
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/ce760b148e29 [^]

Maturity status: Test