Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028870Openbravo ERPA. Platformpublic2015-02-05 12:272015-03-05 23:45
caristu 
AugustoMauch 
urgentmajoralways
closedfixed 
5
pi 
3.0PR15Q33.0PR15Q2 
alostale
Core
No
0028870: Callouts are not executed when using a keyboard shortcut to create a new record under some circumnstances
Callouts are not executed when using a keyboard shortcut to create a new record
1) Go to the [Sales Invoice] window and create a new record in the header
2) Go to the [Lines] tab, create a new record in grid view, select a product and press Ctrl+F2 to open the record in form view
3) In form view, change the Invoiced Quantity field and move to another field. Notice that the callout is not executed (the LineNet Amount is not modified) and therefore is possible to save the record with wrong values
4) Notice that if you create now another record, following the same steps, the problem does not happen
No tags attached.
related to defect 00283093.0PR15Q2 closed AugustoMauch Wrong behavior with Create One link and Switch to form view shortcut 
Issue History
2015-02-05 12:27caristuNew Issue
2015-02-05 12:27caristuAssigned To => AugustoMauch
2015-02-05 12:27caristuModules => Core
2015-02-05 12:27caristuResolution time => 1425682800
2015-02-05 12:27caristuTriggers an Emergency Pack => No
2015-02-05 12:29caristuSummaryCallouts are not executed when using a keyboard shortcut to create a new record => Callouts are not executed when using a keyboard shortcut to create a new record under some circumnstances
2015-02-05 12:29caristuRelationship addedrelated to 0028309
2015-02-05 12:37caristuIssue Monitored: networkb
2015-02-09 10:10alostaleStatusnew => acknowledged
2015-02-18 10:29alostaleAssigned ToAugustoMauch => dbaz
2015-02-18 10:29alostaleStatusacknowledged => scheduled
2015-02-18 10:29alostalefix_in_branch => pi
2015-02-23 13:30jonalegriaesarteTarget Version3.0PR15Q2 => 3.0PR15Q3
2015-02-27 12:48AugustoMauchAssigned Todbaz => AugustoMauch
2015-02-27 14:31AugustoMauchIssue Monitored: alostale
2015-02-27 14:31AugustoMauchReview Assigned To => alostale
2015-02-27 14:31AugustoMauchfix_in_branchpi =>
2015-02-27 14:32hgbotCheckin
2015-02-27 14:32hgbotNote Added: 0075044
2015-02-27 14:32hgbotStatusscheduled => resolved
2015-02-27 14:32hgbotResolutionopen => fixed
2015-02-27 14:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/50e5345f5a57b8c118800544ba6d9e239648fa9f [^]
2015-03-02 09:41alostaleNote Added: 0075057
2015-03-02 09:41alostaleStatusresolved => closed
2015-03-02 09:41alostaleFixed in Version => 3.0PR15Q2
2015-03-02 20:31hudsonbotCheckin
2015-03-02 20:31hudsonbotNote Added: 0075106
2015-03-05 23:45eugeniIssue Monitored: eugeni

Notes
(0075044)
hgbot   
2015-02-27 14:32   
Repository: erp/devel/pi
Changeset: 50e5345f5a57b8c118800544ba6d9e239648fa9f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Feb 27 14:30:15 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/50e5345f5a57b8c118800544ba6d9e239648fa9f [^]

Fixes bug 28870: Callouts are run when moving from grid to form with a shortcut

When a dynamic column is modified, a call is done to the FIC to run the callouts. The list of dynamic columns is stored in the form (in the view form and also in the grid edit form), and is loaded from the
 FIC response. For instance, when a record is created (either or grid or form view), a call is done to the FIC in NEW mode, and the dynamicCols list is initialized.

The cause of this issue is that it was possible to open a record in form view in an inconsistent state, having the form's dynamicCols list not set. In this state the callouts are not run. To get to this in
consistent state, the following steps should take place:
- The user creates a record in the grid (a call to the FIC in NEW mode is done, and the dynamicCols list of the grid edit form is initialized)
- Without saving, the user presses Ctrl+F2 to edit the record in form view. No FIC call is done (there is no need for it), so even though the record is shown in the form view, its dynamicCols list is not s
et. The callouts will not run until a call to the FIC is done (for instance by refreshing the record).

To fix this, the list of dynamicCols of the grid edit form is copied to the form view. This is done in the ksAction_EditInForm function, which is the function executed when the user presses Ctrl+F2 to move
 from the grid view to the form view.

The list of dynamic columns returned from the FIC to the grid view is the same as the one returned from the FIC to the form view, so it is not a problem is a dynamic columns is shown in the form view but n
ot in the grid view.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0075057)
alostale   
2015-03-02 09:41   
code reviewed

tested
(0075106)
hudsonbot   
2015-03-02 20:31   
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/9d659cacae03 [^]
Maturity status: Test