Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021490Openbravo ERPA. Platformpublic2012-08-29 13:432012-09-26 17:18
mtaal 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
3.0MP163.0MP16 
mtaal
Core
No
0021490: Cancel and refresh buttons not shown for child view with errors in grid lines
When I have lines with errors then the cancel or refresh button is not enabled. I expect the following:
- when a line with an error is selected I expect the undo button to be enabled. When I right-click on a line I can do 'cancel changes'. I expect the same from the button in the toolbar.
- the reload/refresh button should always be enabled in my view as on the server data can have changed which I want to reload.

See the attached screenshot.
Goto sales order window
create a new header
enter first a correct line
save
it is saved correctly
then edit this line and clear the quantity field
press enter, the line shows an error and the next line opens
press save for the next line
both lines show errors
the mentioned buttons are disabled (see discussion above)
No tags attached.
png Screenshot at 2012-08-29 13:37:59.png (65,481) 2012-08-29 13:43
https://issues.openbravo.com/file_download.php?file_id=5536&type=bug
png
Issue History
2012-08-29 13:43mtaalNew Issue
2012-08-29 13:43mtaalAssigned To => marvintm
2012-08-29 13:43mtaalFile Added: Screenshot at 2012-08-29 13:37:59.png
2012-08-29 13:43mtaalModules => Core
2012-09-05 10:28AugustoMauchNote Added: 0051865
2012-09-05 10:28AugustoMauchAssigned Tomarvintm => AugustoMauch
2012-09-05 11:04mtaalNote Added: 0051868
2012-09-05 13:36AugustoMauchClosed by => mtaal
2012-09-07 12:01hgbotCheckin
2012-09-07 12:01hgbotNote Added: 0051924
2012-09-07 12:01hgbotStatusnew => resolved
2012-09-07 12:01hgbotResolutionopen => fixed
2012-09-07 12:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7c80eed4c3cfddda0da8df08f8fbbe67370a9391 [^]
2012-09-14 12:49mtaalNote Added: 0052133
2012-09-14 12:49mtaalStatusresolved => new
2012-09-14 12:49mtaalResolutionfixed => open
2012-09-14 13:04AugustoMauchNote Added: 0052136
2012-09-14 14:47mtaalStatusnew => scheduled
2012-09-14 14:47mtaalNote Added: 0052140
2012-09-14 14:47mtaalfix_in_branch => pi
2012-09-14 14:47mtaalNote Added: 0052141
2012-09-14 14:47mtaalStatusscheduled => resolved
2012-09-14 14:47mtaalFixed in Version => 3.0MP16
2012-09-14 14:47mtaalResolutionopen => fixed
2012-09-14 14:48mtaalNote Added: 0052142
2012-09-14 14:48mtaalStatusresolved => closed
2012-09-26 17:18hudsonbotCheckin
2012-09-26 17:18hudsonbotNote Added: 0052709

Notes
(0051865)
AugustoMauch   
2012-09-05 10:28   
Right now the Refresh toolbar button is only enabled when there are not unsaved changes in the view. I think this is right because it prevents to accidentally lose the unsaved changes. So, in order to refresh, the user has to either save or discard the unsaved changes.

If the view grid is shown, the Undo toolbar button is only enabled is the grid is being edited. I think this is wrong, and that it should be enabled if there are unsaved changes in the view, even if the grid is not actually being edited (i.e., in the case described in the steps to reproduce). I think it would be confusing to have it enabled when there are not changes in the view, because there are no changes to undo.
(0051868)
mtaal   
2012-09-05 11:04   
Hi Augusto,
Yes I agree with you, the reason i wanted to have the refresh enabled is to get rid of unsaved changes. But for that it is better to have the undo button enabled and click that one to get rid of unsaved changes.

gr. Martin
(0051924)
hgbot   
2012-09-07 12:01   
Repository: erp/devel/pi
Changeset: 7c80eed4c3cfddda0da8df08f8fbbe67370a9391
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Sep 07 11:56:33 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7c80eed4c3cfddda0da8df08f8fbbe67370a9391 [^]

Fixes issue 21490: Cancel toolbar button enabled when there are unsaved changes

Now the cancel toolbar button will be enabled when there exist unsaved changes, even when the grid is not being edited.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0052133)
mtaal   
2012-09-14 12:49   
I tested this and with multiple lines/records with errors the undo will only revert the changes of one line.

To reproduce:
- goto sales order window
- create a header
- create a line, set a product, clear the quantity field, press enter
- the line shows an error and a new edit row is shown, click/press save
- 2 lines with errors
- click the undo button in the toolbar
- only one line is undone

It could be that only one line is selected, but if no line is selected both lines should be undone.
(0052136)
AugustoMauch   
2012-09-14 13:04   
Hi Martin,

I think it is supossed to work that way. The cancel button will only be enabled when a record with errors is selected, and if the button is pushed it will cancel the changes of that particular row, the same way it works with the contextual menu option.
(0052140)
mtaal   
2012-09-14 14:47   
.
(0052141)
mtaal   
2012-09-14 14:47   
Resolved
(0052142)
mtaal   
2012-09-14 14:48   
Reviewed
(0052709)
hudsonbot   
2012-09-26 17:18   
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/b780e90c6452 [^]

Maturity status: Test