Thu, 27 Nov 2014 09:46:03 +0100Fixed issue 27787: Create new icon is shown when windows are readOnly.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Thu, 27 Nov 2014 09:46:03 +0100] rev 25481
Fixed issue 27787: Create new icon is shown when windows are readOnly.

When the window/tab access for roles was readOnly, the create new icon was shown by the name of the windows, in the recent views layout.

For fixing this the "MenuManager.java" has been changed.
The logic for the window/tab access for the roles has been created. This is for knowing if the window/tab access for roles is read only or not.
Now, if a role has read only access the "create new" icon is not shown in the recent views layout.
It is good to know that the role access data is cached in the quick launch menu and in the recent views layout, so at first the "create new"
green icon by the name of the window in the recent view layout still appears. It is not a problem because when the window is cached again the
correct status is shown.

Tue, 02 Dec 2014 17:05:27 +0100Fixes bug 28309: Editing a record that was just created in grid works properly
Augusto Mauch <augusto.mauch@openbravo.com> [Tue, 02 Dec 2014 17:05:27 +0100] rev 25480
Fixes bug 28309: Editing a record that was just created in grid works properly

There were two problems when a record that was being created in the grid was opened in form view (the only way to do this is by pressing Ctrl+<F2> while creating the record):
- If the user had not entered all the mandatory fields in the grid, then after saving the record was saved in the form view, two new record would appear in the grid
- If the user had entered all the mandatory fields in the grid before pressing <F2>, then the record would be saved in the database before being open in form view.

To fix this, when a record that is being created in grid view is opened in form view by pressing <F2>:
- The record is not saved even if all the mandatory fields had been entered
- No FIC request in NEW mode is done

After doing this there were two problems:
- The valuemaps were not properly loaded in the form view. To fix this, they are copied from the grid edit form to the form view
- If the addition was canceled in the form view, an empty row would be shown in grid view. To fix this, that empty line is removed from the grid view when the addition is cancelled.

Fri, 28 Nov 2014 09:19:52 +0100Fixed issue 27436: A broken trigger needs to be removed.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Fri, 28 Nov 2014 09:19:52 +0100] rev 25479
Fixed issue 27436: A broken trigger needs to be removed.

There was a trigger called AD_TREENODE_MOD_TRG that was not working well. It was created to control if a module was in development or not
and if it was not in development, it couldn't be possible to move it arround the nodes on the tree view in the "Menu" tree.
This feature is handled by the MenuTreeOperationManager.class, and it works well.

For fixing the issue the AD_TREENODE_MOG_TRG trigger has been removed from the database.

Mon, 01 Dec 2014 18:32:17 +0100Fixes issue 28231: Form is not scrolled if it does not have any editable fields
Augusto Mauch <augusto.mauch@openbravo.com> [Mon, 01 Dec 2014 18:32:17 +0100] rev 25478
Fixes issue 28231: Form is not scrolled if it does not have any editable fields

There was a problem with the previous fix: it worked when a record was opened from the grid view to the form view, but then it did not work if the user moved to the previous or next record while in form view.

To fix this, the logic that handled the original problem has been moved from OBStandardView.switchFormGridVisibility function to the OBViewForm.setFocusInForm function. The flow goes through the latter function each time a new record is loaded. In particular the form has to be scrolled down only when the record in being initializaed in the form, that's why a flag has been added to ensure that the code is only executed when the setFocusInForm function is executed from within the retrieveInitialValues function.

Fri, 28 Nov 2014 14:11:01 +0100Fixed issue 28281: When using lazy filtering, funnel icon is not hidden.
Naroa Iriarte <naroa.iriarte@openbravo.com> [Fri, 28 Nov 2014 14:11:01 +0100] rev 25477
Fixed issue 28281: When using lazy filtering, funnel icon is not hidden.

When the lazy filtering is enabled, the funnel icon for clearing the filters was not hidden after clicking it.
The problem was in the "ob-grid.js" file.
The "this.filterImage.hide()" line has been added to the "clear filter" function for hidding the funnel icon. Now, when the lazy filtering is enabled
and the funnel icon is clicked for clearing the filters, the funnel icon disappears as expected.

Mon, 01 Dec 2014 12:06:50 +0100Fixes bug 28188:Grid client-side and backend-side error handling is homogeneous
Augusto Mauch <augusto.mauch@openbravo.com> [Mon, 01 Dec 2014 12:06:50 +0100] rev 25476
Fixes bug 28188:Grid client-side and backend-side error handling is homogeneous

This changeset fixes the last case where the error handling of client-side and backend-side was not homogeneous:
- 4. Error message is shown in the message bar when navigating to Price subtab

To fix this, an error message is shown in the message bar when the backend validation error is detected after autosaving.

Mon, 01 Dec 2014 10:47:31 +0100Related with issue 28188: Grid error handling is more homogeneous than before
Augusto Mauch <augusto.mauch@openbravo.com> [Mon, 01 Dec 2014 10:47:31 +0100] rev 25475
Related with issue 28188: Grid error handling is more homogeneous than before

This note [1] described four cases where the handling of validation errors detected in the front end was different thant the handling of validation errors detected in the back end. These three cases have been fixed by the present changeset:
- 7. Cancel changes button is enabled when selecting several problematic errors, being possible to cancel changes for all of them at the same time
- 8. Popup appears when navigating to another tab to notify the user about the erroneous state
- 9. Record contextual menu (mouse right click) includes "Cancel changes" option.

The mechanism to handle these cases was already in place, but was not working properly because:
- The OBViewGrid.ERROR_MESSAGE_PROP attribute was undefined. It has been undefined since the ob-view-grid.js file was created. Probably it had a value when the contents of ob-view-grid.js were stored in another filed and they were not copied to the new file. This property is set when it is detected that a row has a validation error and then it is checked in the OBViewGrid.hasError function.
- The OBViewGrid.hasError function was not working properly when the validation errors were detected in the backend. It was returning false if the grid was not currently being edited, so it was not reaching the point where the OBViewGrid.ERROR_MESSAGE_PROP attribute of the saved row was checked. The code that has been removed was used to fix this issue [2], which remains fixed even with those lines deleted.

[1] https://issues.openbravo.com/view.php?id=28188#c72137
[2] https://issues.openbravo.com/view.php?id=17377

Mon, 01 Dec 2014 15:50:26 +0530Backout Issue 27809: Backed out changeset fd457423c9e6
Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan@openbravo.com> [Mon, 01 Dec 2014 15:50:26 +0530] rev 25474
Backout Issue 27809: Backed out changeset fd457423c9e6

Wed, 05 Nov 2014 18:56:41 -0500Fixed bug 27809: The Wrong sales invoice alert can not be properly deactivated.
Reinaldo Guerra <reinaldo.guerra@peoplewalking.com> [Wed, 05 Nov 2014 18:56:41 -0500] rev 25473
Fixed bug 27809: The Wrong sales invoice alert can not be properly deactivated.

Method existsAlertRule on Alerts For Wrong Invoices module script xsql file was changed to not take into account if wrong invoice alert is active or not so when module script is executed and the mentioned alert is deactivated it is recognized as an existent rule and it is not inserted again as active.
Now it is possible to deactivate The Wrong sales invoice alert and conserves its status, no matter an update database is executed.

Fri, 28 Nov 2014 14:04:22 +0100Related issue 27670: Added two small refactoring.
Inigo Sanchez <inigo.sanchez@openbravo.com> [Fri, 28 Nov 2014 14:04:22 +0100] rev 25472
Related issue 27670: Added two small refactoring.

It has been prevented an extra if. Besides, it has been used OB coding
convection using single quotes.